qt5base-lts/tests/auto/testlib/selftests/expected_verifyexceptionthrown.junitxml
Tor Arne Vestbø 27db9e458c testlib: Clarify that our XUnit reporter is actually a JUnit reporter
The reporter was probably named 'xunit' based on the historical use of
xUnit to refer to testing frameworks derived from Smalltalk's SUnit.
These frameworks typically added their own prefix, e.g. JUnit for Java,
RUnit for R, etc.

The most popular of these was the JUnit framework, and the corresponding
XML output produced by the Ant built tool became somewhat of a de facto
standard, which is probably why we chose to model our reporter after it.

Nowadays however, naming it 'xunit' is problematic as there is actually
a testing famework named xUnit.net, typically shortened to, you guessed
it: xunit.

Test report consumers will typically have a junit mode, and an xunit
mode, and the latter could easily be mistaken for what testlib outputs,
unless we clarify this.

The clarification also allows us to safely extend our support for the
JUnit XML format to incorporate some elements that are nowadays common,
but where we are lagging behind the standard.

[ChangeLog][QTestLib] The formerly named 'xunitxml' test reporter has
been renamed to what it actually is: a JUnit test reporter, and is now
triggered by passing -o junitxml to the test binary.

Change-Id: Ieb20d3d2b5905c74e55b98174948cc70870c0ef9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 13:48:25 +01:00

33 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="6" tests="11" name="tst_VerifyExceptionThrown">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
<property value="" name="QtBuild"/>
</properties>
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testCorrectStdTypes"/>
<testcase result="pass" name="testCorrectStdExceptions"/>
<testcase result="pass" name="testCorrectMyExceptions"/>
<testcase result="fail" name="testFailInt">
<failure message="Expected exception of type double to be thrown but unknown exception caught" result="fail"/>
</testcase>
<testcase result="fail" name="testFailStdString">
<failure message="Expected exception of type char* to be thrown but unknown exception caught" result="fail"/>
</testcase>
<testcase result="fail" name="testFailStdRuntimeError">
<failure message="Expected exception of type std::runtime_error to be thrown but std::exception caught with message: logic error" result="fail"/>
</testcase>
<testcase result="fail" name="testFailMyException">
<failure message="Expected exception of type MyBaseException to be thrown but std::exception caught with message: logic error" result="fail"/>
</testcase>
<testcase result="fail" name="testFailMyDerivedException">
<failure message="Expected exception of type std::runtime_error to be thrown but std::exception caught with message: MyDerivedException" result="fail"/>
</testcase>
<testcase result="fail" name="testFailNoException">
<failure message="Expected exception of type std::exception to be thrown but no exception caught" result="fail"/>
</testcase>
<testcase result="pass" name="cleanupTestCase"/>
<system-err/>
</testsuite>