qt5base-lts/tests/auto/testlib/selftests/expected_xunit.junitxml
Friedemann Kleint 539553a572 QTestlib/JUnit XML: Log most messages to standard output instead of error output
Add an enumeration for system-out and alog element
for it. Redirect the messages types that are not warnings/errors
to this element. For compatibility, write it out only
if it is not empty. Rename enumerations and members accordingly.

[ChangeLog][QtTestLib] In JUnit XML, output that is
not a warning/error is now logged under <system-out>
instead of <system-err>.

Fixes: QTBUG-86540
Change-Id: I55598eafa7dafa486ac5a8221029c332ff47413b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-15 18:05:40 +01:00

44 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="tst_Xunit" timestamp="@TEST_START_TIME@" tests="9" failures="3" errors="5" time="@TEST_DURATION@">
<properties>
<property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/>
<property name="QtVersion" value="@INSERT_QT_VERSION_HERE@"/>
<property name="QtBuild" value=""/>
</properties>
<testcase name="initTestCase" result="pass" time="@TEST_DURATION@"/>
<testcase name="testFunc1" result="pass" time="@TEST_DURATION@">
<!-- type="warn" message="just a QWARN() !" -->
</testcase>
<testcase name="testFunc2" result="fail" time="@TEST_DURATION@">
<!-- type="qdebug" message="a qDebug() call with comment&#x002D;ending stuff &#x002D;&#x002D;&gt;" -->
<failure result="fail" message="Compared values are not the same
Actual (2): 2
Expected (3): 3"/>
</testcase>
<testcase name="testFunc3" time="@TEST_DURATION@">
<!-- type="skip" message="skipping this function!" -->
</testcase>
<testcase name="testFunc4" result="fail" time="@TEST_DURATION@">
<failure result="fail" message="a forced failure!"/>
</testcase>
<testcase name="testFunc5" result="xfail" time="@TEST_DURATION@">
<!-- type="info" message="this failure is expected" -->
</testcase>
<testcase name="testFunc6" result="xfail" time="@TEST_DURATION@">
<!-- type="info" message="this failure is also expected" -->
</testcase>
<testcase name="testFunc7" result="xpass" time="@TEST_DURATION@">
<failure result="xpass" message="&apos;true&apos; returned TRUE unexpectedly. ()"/>
</testcase>
<testcase name="cleanupTestCase" result="pass" time="@TEST_DURATION@"/>
<system-out>
<![CDATA[a qDebug() call with comment-ending stuff -->]]>
<![CDATA[skipping this function!]]>
<![CDATA[this failure is expected]]>
<![CDATA[this failure is also expected]]>
</system-out>
<system-err>
<![CDATA[just a QWARN() !]]>
</system-err>
</testsuite>