qt5base-lts/tests/auto/testlib/selftests/expected_badxml.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

53 lines
3.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="tst_BadXml" timestamp="@TEST_START_TIME@" tests="6" failures="5" errors="13" 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="badDataTag" result="fail" time="@TEST_DURATION@">
<!-- type="qdebug" message="a message" tag="fail end cdata ]]&gt; text ]]&gt; more text" -->
<failure result="fail" message="a failure" tag="fail end cdata ]]&gt; text ]]&gt; more text"/>
<!-- type="qdebug" message="a message" tag="pass end cdata ]]&gt; text ]]&gt; more text" -->
<!-- type="qdebug" message="a message" tag="fail quotes &quot; text&quot; more text" -->
<failure result="fail" message="a failure" tag="fail quotes &quot; text&quot; more text"/>
<!-- type="qdebug" message="a message" tag="pass quotes &quot; text&quot; more text" -->
<!-- type="qdebug" message="a message" tag="fail xml close &gt; open &lt; tags &lt; text" -->
<failure result="fail" message="a failure" tag="fail xml close &gt; open &lt; tags &lt; text"/>
<!-- type="qdebug" message="a message" tag="pass xml close &gt; open &lt; tags &lt; text" -->
<!-- type="qdebug" message="a message" tag="fail all &gt; &quot; mixed ]]&gt; up &gt; &quot; in &lt; the ]]&gt; hopes &lt; of triggering &quot;&lt; ]]&gt; bugs" -->
<failure result="fail" message="a failure" tag="fail all &gt; &quot; mixed ]]&gt; up &gt; &quot; in &lt; the ]]&gt; hopes &lt; of triggering &quot;&lt; ]]&gt; bugs"/>
<!-- type="qdebug" message="a message" tag="pass all &gt; &quot; mixed ]]&gt; up &gt; &quot; in &lt; the ]]&gt; hopes &lt; of triggering &quot;&lt; ]]&gt; bugs" -->
</testcase>
<testcase name="badMessage" result="pass" time="@TEST_DURATION@">
<!-- type="qdebug" message="end cdata ]]&gt; text ]]&gt; more text" tag="string 0" -->
<!-- type="qdebug" message="quotes &quot; text&quot; more text" tag="string 1" -->
<!-- type="qdebug" message="xml close &gt; open &lt; tags &lt; text" tag="string 2" -->
<!-- type="qdebug" message="all &gt; &quot; mixed ]]&gt; up &gt; &quot; in &lt; the ]]&gt; hopes &lt; of triggering &quot;&lt; ]]&gt; bugs" tag="string 3" -->
</testcase>
<testcase name="failWithNoFile" result="fail" time="@TEST_DURATION@">
<failure result="fail" message="failure message"/>
</testcase>
<testcase name="encoding" result="pass" time="@TEST_DURATION@">
<!-- type="qdebug" message="&quot;Ülrich Ümläut&quot;" -->
</testcase>
<testcase name="cleanupTestCase" result="pass" time="@TEST_DURATION@"/>
<system-out>
<![CDATA[a message]]>
<![CDATA[a message]]>
<![CDATA[a message]]>
<![CDATA[a message]]>
<![CDATA[a message]]>
<![CDATA[a message]]>
<![CDATA[a message]]>
<![CDATA[a message]]>
<![CDATA[end cdata ]]]><![CDATA[]> text ]]]><![CDATA[]> more text]]>
<![CDATA[quotes " text" more text]]>
<![CDATA[xml close > open < tags < text]]>
<![CDATA[all > " mixed ]]]><![CDATA[]> up > " in < the ]]]><![CDATA[]> hopes < of triggering "< ]]]><![CDATA[]> bugs]]>
<![CDATA["Ülrich Ümläut"]]>
</system-out>
<system-err/>
</testsuite>