Closed
Description
The ut_teamcity_reporter
provides a pretty unhelpful, general "Error occured" message when an exception occurs during a test run. It adds the callstack, but not the actual error.
Instead, it should provide the actual error message.
create or replace package ut_error as
-- %suite(Error reporting showcase)
-- %test(This throws an error)
procedure throw_error;
end;
/
create or replace package body ut_error as
procedure throw_error as
begin
raise_application_error(-20000, 'Helpful error message');
end;
end;
/
call ut.run('ut_error', ut_teamcity_reporter());
Output:
##teamcity[testSuiteStarted timestamp='2020-04-20T12:20:00.908+0200' name='Error reporting showcase']
##teamcity[testStarted timestamp='2020-04-20T12:20:00.909+0200' captureStandardOutput='true' name='pmuser.ut_error.throw_error']
##teamcity[testStdErr timestamp='2020-04-20T12:20:00.913+0200' name='pmuser.ut_error.throw_error' out='Test exception:|nORA-06512: in "PMUSER.UT_ERROR", Zeile 4|nORA-06512: in Zeile 6|n|n']
##teamcity[testFailed timestamp='2020-04-20T12:20:00.913+0200' details='Test exception:|nORA-06512: in "PMUSER.UT_ERROR", Zeile 4|nORA-06512: in Zeile 6|n|n' message='Error occured' name='p
muser.ut_error.throw_error']
##teamcity[testFinished timestamp='2020-04-20T12:20:00.913+0200' duration='3' name='pmuser.ut_error.throw_error']
##teamcity[testSuiteFinished timestamp='2020-04-20T12:20:00.914+0200' name='Error reporting showcase']