Skip to content

realtime_reporter does not emit warnings #936

Closed
@PhilippSalvisberg

Description

@PhilippSalvisberg

Describe the bug

The realtime_reporter introduced in v3.1.4 reports the number of warnings on test and suite level, but does not provide the warning texts. Hence clients such utPLSQL for SQL Developer cannot provide warning texts.

Provide version info

19.0.0.0.0
19.0.0


PL/SQL procedure successfully completed.


UT_VERSION                                                  
------------------------------------------------------------
v3.1.7.3041-develop


BANNER                                                                           BANNER_FULL                                                                                                                                                      BANNER_LEGACY                                                                        CON_ID
-------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production           Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production                                                                                           Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production                    0
                                                                                 Version 19.2.0.0.0                                                                                                                                                                                                                                          



PARAMETER                      VALUE                                                           
------------------------------ ----------------------------------------------------------------
NLS_LANGUAGE                   ENGLISH                                                         
NLS_TERRITORY                  SWITZERLAND                                                     
NLS_CURRENCY                   SFr.                                                            
NLS_ISO_CURRENCY               SWITZERLAND                                                     
NLS_NUMERIC_CHARACTERS         .'                                                              
NLS_CALENDAR                   GREGORIAN                                                       
NLS_DATE_FORMAT                DD.MM.YYYY HH24:MI:SS                                           
NLS_DATE_LANGUAGE              ENGLISH                                                         
NLS_SORT                       BINARY                                                          
NLS_TIME_FORMAT                HH24:MI:SSXFF                                                   
NLS_TIMESTAMP_FORMAT           DD.MM.RR HH24:MI:SSXFF                                          

PARAMETER                      VALUE                                                           
------------------------------ ----------------------------------------------------------------
NLS_TIME_TZ_FORMAT             HH24:MI:SSXFF TZR                                               
NLS_TIMESTAMP_TZ_FORMAT        DD.MM.RR HH24:MI:SSXFF TZR                                      
NLS_DUAL_CURRENCY              SF                                                              
NLS_COMP                       BINARY                                                          
NLS_LENGTH_SEMANTICS           BYTE                                                            
NLS_NCHAR_CONV_EXCP            FALSE                                                           

17 rows selected. 


PORT_STRING                                                 
------------------------------------------------------------
x86_64/Linux 2.4.xx

Information about client software

not relevant

To Reproduce

  1. Setup Test
create or replace package check_realtime_reporting4 is
  --%suite
  --%suitepath(realtime_reporting)
  /* tag annotation without parameter will raise a warning */
  --%tags

  --%test 
  procedure test_8_with_warning;
end;
/
create or replace package body check_realtime_reporting4 is
  procedure test_8_with_warning is
  begin
    commit; -- this will raise a warning
    ut3.ut.expect(8).to_equal(8);
  end;
end;
/
  1. Run test
set serveroutput on
exec ut.run('check_realtime_reporting4', ut_realtime_reporter());

this will produce the following output:

<?xml version="1.0"?>
<event type="pre-run">
  <items>
    <suite id="realtime_reporting">
      <name>realtime_reporting</name>
      <items>
        <suite id="realtime_reporting.check_realtime_reporting4">
          <name>check_realtime_reporting4</name>
          <items>
            <test id="realtime_reporting.check_realtime_reporting4.test_8_with_warning">
              <executableType>test</executableType>
              <ownerName>SCOTT</ownerName>
              <objectName>check_realtime_reporting4</objectName>
              <procedureName>test_8_with_warning</procedureName>
              <disabled>false</disabled>
              <name>test_8_with_warning</name>
              <testNumber>1</testNumber>
            </test>
          </items>
        </suite>
      </items>
    </suite>
  </items>
  <totalNumberOfTests>1</totalNumberOfTests>
</event>

<?xml version="1.0"?>
<event type="pre-suite">
  <suite id="realtime_reporting">
  </suite>
</event>

<?xml version="1.0"?>
<event type="pre-suite">
  <suite id="realtime_reporting.check_realtime_reporting4">
  </suite>
</event>

<?xml version="1.0"?>
<event type="pre-test">
  <test id="realtime_reporting.check_realtime_reporting4.test_8_with_warning">
    <testNumber>1</testNumber>
    <totalNumberOfTests>1</totalNumberOfTests>
  </test>
</event>

<?xml version="1.0"?>
<event type="post-test">
  <test id="realtime_reporting.check_realtime_reporting4.test_8_with_warning">
    <testNumber>1</testNumber>
    <totalNumberOfTests>1</totalNumberOfTests>
    <startTime>2019-06-12T15:29:29.118153</startTime>
    <endTime>2019-06-12T15:29:29.122445</endTime>
    <executionTime>.004292</executionTime>
    <counter>
      <disabled>0</disabled>
      <success>1</success>
      <failure>0</failure>
      <error>0</error>
      <warning>1</warning>
    </counter>
  </test>
</event>

<?xml version="1.0"?>
<event type="post-suite">
  <suite id="realtime_reporting.check_realtime_reporting4">
    <startTime>2019-06-12T15:29:29.115500</startTime>
    <endTime>2019-06-12T15:29:29.125941</endTime>
    <executionTime>.010441</executionTime>
    <counter>
      <disabled>0</disabled>
      <success>1</success>
      <failure>0</failure>
      <error>0</error>
      <warning>3</warning>
    </counter>
  </suite>
</event>

<?xml version="1.0"?>
<event type="post-suite">
  <suite id="realtime_reporting">
    <startTime>2019-06-12T15:29:29.113868</startTime>
    <endTime>2019-06-12T15:29:29.128376</endTime>
    <executionTime>.014508</executionTime>
    <counter>
      <disabled>0</disabled>
      <success>1</success>
      <failure>0</failure>
      <error>0</error>
      <warning>3</warning>
    </counter>
  </suite>
</event>

<?xml version="1.0"?>
<event type="post-run">
  <run>
    <startTime>2019-06-12T15:29:29.112395</startTime>
    <endTime>2019-06-12T15:29:29.130831</endTime>
    <executionTime>.018436</executionTime>
    <counter>
      <disabled>0</disabled>
      <success>1</success>
      <failure>0</failure>
      <error>0</error>
      <warning>3</warning>
    </counter>
  </run>
</event>

Please note that there are warning tags in the XML documents providing the number of warnings found, but no warning texts.

Expected behavior

add warnings tags to the output document for event types:

  • post-test
  • post-suite

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions