View will return Jenkins Compatible XML Report.

Note: to get valid XML document use RPTLINE column and make sure that result is sorted by SECTIONORDER, SUITEORDER, and CASEORDER columns in ascending order

Column Name Data Type Description
RowType VARCHAR

Type of the report row:

  • ROOT OPEN
  • SUITE OPEN
  • UNITTEST
  • SUITE CLOSE
  • ROOT CLOSE
Suite VARCHAR Name of the Unit Test Suite
UnitTestName VARCHAR Name of the Unit Test
SectionOrder INT Order of the section part in the report. To get correct XML document always order by this column first in ascending order. 
SuiteOrder INT Suites section order. To get correct XML document always order by this column second in ascending order.
TestOrder INT Order of the unit test lines in the suite section on the report. To get correct XML document always order by this column third in ascending order.
RptLine NVARCHAR XML report line
 

Example

following query will produce Jenkins compatible report for all unit test that have run:

      SELECT 
            RptLine
      FROM 
            DBTD_VW_RPT_Jenkins
      ORDER BY 
            SECTIONORDER ASC, 
            SUITEORDER ASC, 
            CASEORDER ASC;

Output

 

<testsuites>

<testsuite name="DBTD" tests="3" errors="0" failures="0" skipped="1" time="0.005">
    <testcase name="UT_DBTD_AssertFailOnError" 
             
classname="UT_DBTD_AssertFailOnError" time="0.00005" />
    <testcase name="UT_DBTD_AssertFailOnFailure" 
             
classname="UT_DBTD_AssertFailOnFailure" time="0.00005" />
    <testcase name="UT_DBTD_DTIsGreaterOrEqual" 
             
classname="UT_DBTD_DTIsGreaterOrEqual" time="0.00005" />
</testsuite><!-- DBTD-->

<testsuite name="DBTD1" tests="3" errors="0" failures="0" skipped="0" time="0.005">
    <testcase name="UT_DBTD1_Test1" 
             
classname="UT_DBTD1_Test1" time="0.00005" />
    <testcase name="UT_DBTD1_Test2"
              classname="UT_DBTD1_Test2" time="0.00005" />
    <testcase name="UT_DBTD1_Test3" 
             
classname="UT_DBTD1_Test3" time="0.00005" />
</testsuite><!-- DBTD1-->

<testsuite name="TEST1" tests="1" errors="0" failures="0" skipped="1" time="0.005">
    <testcase name="UT_TEST1_IgnoreMe" 
             
classname="UT_TEST1_IgnoreMe" time="0.00005" ><skipped/></testcase>
</testsuite><!-- TEST1-->

<testsuite name="TEST2" tests="2" errors="0" failures="0" skipped="2" time="0.005">
    <testcase name="UT_TEST2_ShouldNotRunA" 
             
classname="UT_TEST2_ShouldNotRunA" time="0.00005" > <skipped/> </testcase>
    <testcase name="UT_TEST2_ShouldNotRunB" 
             
classname="UT_TEST2_ShouldNotRunB" time="0.00005" > <skipped/> </testcase>
</testsuite><!-- TEST2-->

</testsuites>

 

 

See Also