From 5eab4aaf4d06e8e9fb914690a6bd42a05f33e75b Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Tue, 18 Feb 2020 01:08:18 +0000 Subject: [PATCH 1/2] Fixed Teamcity reporting of errors Resolves #1045 --- source/reporters/ut_teamcity_reporter.tpb | 4 ++-- test/ut3_user/reporters/test_teamcity_reporter.pkb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/reporters/ut_teamcity_reporter.tpb b/source/reporters/ut_teamcity_reporter.tpb index ee0a53098..9475c0a90 100644 --- a/source/reporters/ut_teamcity_reporter.tpb +++ b/source/reporters/ut_teamcity_reporter.tpb @@ -74,7 +74,7 @@ create or replace type body ut_teamcity_reporter is begin l_idx := a_executables.first; while l_idx is not null loop - l_message := l_message || add_error_message(a_executables(l_idx).error_backtrace, a_message_name); + l_message := l_message || add_error_message( a_executables(l_idx).get_error_stack_trace(), a_message_name ); l_idx := a_executables.next(l_idx); end loop; return l_message; @@ -92,7 +92,7 @@ create or replace type body ut_teamcity_reporter is if a_test.result = ut_utils.gc_error then l_std_err_msg := l_std_err_msg || add_error_messages(a_test.before_each_list, 'Before each exception:'); l_std_err_msg := l_std_err_msg || add_error_messages(a_test.before_test_list, 'Before test exception:'); - l_std_err_msg := l_std_err_msg || add_error_message(a_test.item.error_backtrace, 'Test exception:'); + l_std_err_msg := l_std_err_msg || add_error_message(a_test.item.get_error_stack_trace(), 'Test exception:'); l_std_err_msg := l_std_err_msg || add_error_messages(a_test.after_test_list, 'After test exception:'); l_std_err_msg := l_std_err_msg || add_error_messages(a_test.after_each_list, 'After each exception:'); diff --git a/test/ut3_user/reporters/test_teamcity_reporter.pkb b/test/ut3_user/reporters/test_teamcity_reporter.pkb index 71d2f857d..032399aee 100644 --- a/test/ut3_user/reporters/test_teamcity_reporter.pkb +++ b/test/ut3_user/reporters/test_teamcity_reporter.pkb @@ -63,8 +63,8 @@ create or replace package body test_teamcity_reporter as -%##teamcity[testStdErr timestamp='%' name='ut3$user#.test_reporters.erroring_test' out='Test exception:|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|n|n'] -%##teamcity[testFailed timestamp='%' details='Test exception:|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|n|n' message='Error occured' name='ut3$user#.test_reporters.erroring_test'] +%##teamcity[testStdErr timestamp='%' name='ut3$user#.test_reporters.erroring_test' out='Test exception:|nORA-06502: PL/SQL: numeric or value error: character to number conversion error|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|nORA-06512: at %|n'] +%##teamcity[testFailed timestamp='%' details='Test exception:|nORA-06502: PL/SQL: numeric or value error: character to number conversion error|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|nORA-06512: at %|n' message='Error occured' name='ut3$user#.test_reporters.erroring_test'] %##teamcity[testFinished timestamp='%' duration='%' name='ut3$user#.test_reporters.erroring_test'] %##teamcity[testStarted timestamp='%' captureStandardOutput='true' name='ut3$user#.test_reporters.disabled_test'] %##teamcity[testIgnored timestamp='%' name='ut3$user#.test_reporters.disabled_test'] From 67c4e7816b453824722391d79bcee634af5bfda4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20G=C4=99bal?= Date: Tue, 18 Feb 2020 01:33:23 +0000 Subject: [PATCH 2/2] Update test_teamcity_reporter.pkb --- test/ut3_user/reporters/test_teamcity_reporter.pkb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ut3_user/reporters/test_teamcity_reporter.pkb b/test/ut3_user/reporters/test_teamcity_reporter.pkb index 032399aee..a5261d7f9 100644 --- a/test/ut3_user/reporters/test_teamcity_reporter.pkb +++ b/test/ut3_user/reporters/test_teamcity_reporter.pkb @@ -63,8 +63,8 @@ create or replace package body test_teamcity_reporter as -%##teamcity[testStdErr timestamp='%' name='ut3$user#.test_reporters.erroring_test' out='Test exception:|nORA-06502: PL/SQL: numeric or value error: character to number conversion error|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|nORA-06512: at %|n'] -%##teamcity[testFailed timestamp='%' details='Test exception:|nORA-06502: PL/SQL: numeric or value error: character to number conversion error|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|nORA-06512: at %|n' message='Error occured' name='ut3$user#.test_reporters.erroring_test'] +%##teamcity[testStdErr timestamp='%' name='ut3$user#.test_reporters.erroring_test' out='Test exception:|nORA-06502: PL/SQL: numeric or value error: character to number conversion error|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|n'] +%##teamcity[testFailed timestamp='%' details='Test exception:|nORA-06502: PL/SQL: numeric or value error: character to number conversion error|nORA-06512: at "UT3$USER#.TEST_REPORTERS", line %|nORA-06512: at %|n' message='Error occured' name='ut3$user#.test_reporters.erroring_test'] %##teamcity[testFinished timestamp='%' duration='%' name='ut3$user#.test_reporters.erroring_test'] %##teamcity[testStarted timestamp='%' captureStandardOutput='true' name='ut3$user#.test_reporters.disabled_test'] %##teamcity[testIgnored timestamp='%' name='ut3$user#.test_reporters.disabled_test']