2011-04-27 10:05:43 +00:00
|
|
|
<Environment>
|
|
|
|
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
Use new QLibraryInfo::build() in testlib to log build information.
This produces:
********* Start testing of tst_QtJson *********
Config: Using QtTest library 5.3.0, Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)
PASS : tst_QtJson::initTestCase()
<?xml version="1.0" encoding="UTF-8"?>
<TestCase name="tst_QtJson">
<Environment>
<QtVersion>5.3.0</QtVersion>
<QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild>
<QTestVersion>5.3.0</QTestVersion>
</Environment>
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="1" failures="1" tests="42" name="tst_QtJson">
<properties>
<property value="5.3.0" name="QTestVersion"/>
<property value="5.3.0" name="QtVersion"/>
<property value="Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)" name="QtBuild"/>
</properties>
<Environment>
<QtVersion>5.3.0</QtVersion>
<QtBuild>Qt 5.3.0 (Feb 13 2014, GCC 4.6.3, 64 bit, debug build)</QtBuild>
<QTestVersion>5.3.0</QTestVersion>
</Environment>
[ChangeLog][QtTest] Tests now output build information.
Change-Id: I0ab473371575f2b807db725256805b8bffea3454
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-26 16:12:45 +00:00
|
|
|
<QtBuild/>
|
2011-04-27 10:05:43 +00:00
|
|
|
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
|
|
|
</Environment>
|
|
|
|
<TestFunction name="initTestCase">
|
2011-08-30 09:54:32 +00:00
|
|
|
<Incident type="pass" file="" line="0" />
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2011-04-27 10:05:43 +00:00
|
|
|
</TestFunction>
|
2012-02-01 04:33:42 +00:00
|
|
|
<TestFunction name="xfailAndContinue">
|
2011-04-27 10:05:43 +00:00
|
|
|
<Message type="qdebug" file="" line="0">
|
|
|
|
<Description><![CDATA[begin]]></Description>
|
|
|
|
</Message>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2011-04-27 10:05:43 +00:00
|
|
|
<Description><![CDATA[This should xfail]]></Description>
|
2011-08-31 02:52:27 +00:00
|
|
|
</Incident>
|
2011-04-27 10:05:43 +00:00
|
|
|
<Message type="qdebug" file="" line="0">
|
|
|
|
<Description><![CDATA[after]]></Description>
|
|
|
|
</Message>
|
2011-08-31 02:52:27 +00:00
|
|
|
<Incident type="pass" file="" line="0" />
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2011-04-27 10:05:43 +00:00
|
|
|
</TestFunction>
|
2012-02-01 04:33:42 +00:00
|
|
|
<TestFunction name="xfailAndAbort">
|
2011-04-27 10:05:43 +00:00
|
|
|
<Message type="qdebug" file="" line="0">
|
|
|
|
<Description><![CDATA[begin]]></Description>
|
|
|
|
</Message>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2011-04-27 10:05:43 +00:00
|
|
|
<Description><![CDATA[This should xfail]]></Description>
|
|
|
|
</Incident>
|
2011-08-31 02:52:27 +00:00
|
|
|
<Incident type="pass" file="" line="0" />
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2011-04-27 10:05:43 +00:00
|
|
|
</TestFunction>
|
2012-02-01 04:33:42 +00:00
|
|
|
<TestFunction name="xfailTwice">
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-01-12 03:16:44 +00:00
|
|
|
<Description><![CDATA[Already expecting a fail]]></Description>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-01-12 03:16:44 +00:00
|
|
|
</TestFunction>
|
2011-04-27 10:05:43 +00:00
|
|
|
<TestFunction name="xfailWithQString">
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2011-04-27 10:05:43 +00:00
|
|
|
<Description><![CDATA[A string]]></Description>
|
2011-08-31 02:52:27 +00:00
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2011-04-27 10:05:43 +00:00
|
|
|
<Description><![CDATA[Bug 5 (The message)]]></Description>
|
|
|
|
</Incident>
|
2011-08-31 02:52:27 +00:00
|
|
|
<Incident type="pass" file="" line="0" />
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2011-04-27 10:05:43 +00:00
|
|
|
</TestFunction>
|
2012-02-20 00:15:57 +00:00
|
|
|
<TestFunction name="xfailDataDrivenWithQVerify">
|
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.
This commit makes testlib count one pass, fail or skip for each data
row. Test functions that are not data-driven count one result for the
test function, as before. Benchmark tests count one pass, fail or skip
per iteration.
A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed. Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.
The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass. Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.
Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
2012-02-02 07:08:44 +00:00
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Pass 1]]></DataTag>
|
|
|
|
</Incident>
|
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Pass 2]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-01-11 06:18:55 +00:00
|
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
|
|
</Incident>
|
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.
This commit makes testlib count one pass, fail or skip for each data
row. Test functions that are not data-driven count one result for the
test function, as before. Benchmark tests count one pass, fail or skip
per iteration.
A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed. Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.
The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass. Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.
Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
2012-02-02 07:08:44 +00:00
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-02-20 00:15:57 +00:00
|
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
|
|
</Incident>
|
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-02-20 00:15:57 +00:00
|
|
|
</TestFunction>
|
|
|
|
<TestFunction name="xfailDataDrivenWithQCompare">
|
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Pass 1]]></DataTag>
|
|
|
|
</Incident>
|
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Pass 2]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-02-20 00:15:57 +00:00
|
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
|
|
</Incident>
|
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Abort]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-01-11 06:18:55 +00:00
|
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
|
|
</Incident>
|
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.
This commit makes testlib count one pass, fail or skip for each data
row. Test functions that are not data-driven count one result for the
test function, as before. Benchmark tests count one pass, fail or skip
per iteration.
A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed. Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.
The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass. Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.
Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
2012-02-02 07:08:44 +00:00
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Continue]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-01-11 06:18:55 +00:00
|
|
|
</TestFunction>
|
2012-02-01 04:33:42 +00:00
|
|
|
<TestFunction name="xfailOnWrongRow">
|
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.
This commit makes testlib count one pass, fail or skip for each data
row. Test functions that are not data-driven count one result for the
test function, as before. Benchmark tests count one pass, fail or skip
per iteration.
A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed. Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.
The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass. Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.
Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
2012-02-02 07:08:44 +00:00
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[right row]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-01-12 03:47:25 +00:00
|
|
|
</TestFunction>
|
2012-02-01 04:33:42 +00:00
|
|
|
<TestFunction name="xfailOnAnyRow">
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-01-12 04:57:08 +00:00
|
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
|
|
</Incident>
|
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.
This commit makes testlib count one pass, fail or skip for each data
row. Test functions that are not data-driven count one result for the
test function, as before. Benchmark tests count one pass, fail or skip
per iteration.
A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed. Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.
The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass. Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.
Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
2012-02-02 07:08:44 +00:00
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-01-12 04:57:08 +00:00
|
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
|
|
<Description><![CDATA[This test should xfail]]></Description>
|
|
|
|
</Incident>
|
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.
This commit makes testlib count one pass, fail or skip for each data
row. Test functions that are not data-driven count one result for the
test function, as before. Benchmark tests count one pass, fail or skip
per iteration.
A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed. Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.
The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass. Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.
Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
2012-02-02 07:08:44 +00:00
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-01-12 04:57:08 +00:00
|
|
|
</TestFunction>
|
2012-02-01 05:42:00 +00:00
|
|
|
<TestFunction name="xfailWithoutVerify">
|
testlib: Pass on file location on failure, but don't assume we have one
We try our best to pass on the file location of a failure, including for
fatal errors, but the reporting or logging machinery should not assume
there is one.
By passing on nullptr for the file location we allow the logging backends
to decide how to handle the situation, e.g. by not emitting extra fields
for failure location.
This effectively reverts c25687fa0b6e4be043e1f8c92c093d8b06ca06c4,
in favor of relying on the backends to cope with null filename,
which they already did.
As qFatal uses QMessageLogger, which by default disables file/line
information in release builds, we need to explicitly enable this in
our self-tests, to get uniform test results. Similarly, we disable
file/line info from testlib itself, as reporting Qt internal file
and line information for user diagnostics is less useful. The odd
one out there is qtestdata.cpp, which still ends up in test output
due to using QTEST_ASSERT instead of qFatal for its diagnostics.
Cleaning up that, and unifying how we report testlib issues to the
user, is left for another day.
Pick-to: 6.2
Change-Id: Ib9451b8eed86fe3ade4a4dcaf0037e1a3450321c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-07-28 09:44:01 +00:00
|
|
|
<Incident type="fail" file="" line="0">
|
2012-02-01 05:42:00 +00:00
|
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
|
|
<Description><![CDATA[QEXPECT_FAIL was called without any subsequent verification statements]]></Description>
|
|
|
|
</Incident>
|
testlib: Pass on file location on failure, but don't assume we have one
We try our best to pass on the file location of a failure, including for
fatal errors, but the reporting or logging machinery should not assume
there is one.
By passing on nullptr for the file location we allow the logging backends
to decide how to handle the situation, e.g. by not emitting extra fields
for failure location.
This effectively reverts c25687fa0b6e4be043e1f8c92c093d8b06ca06c4,
in favor of relying on the backends to cope with null filename,
which they already did.
As qFatal uses QMessageLogger, which by default disables file/line
information in release builds, we need to explicitly enable this in
our self-tests, to get uniform test results. Similarly, we disable
file/line info from testlib itself, as reporting Qt internal file
and line information for user diagnostics is less useful. The odd
one out there is qtestdata.cpp, which still ends up in test output
due to using QTEST_ASSERT instead of qFatal for its diagnostics.
Cleaning up that, and unifying how we report testlib issues to the
user, is left for another day.
Pick-to: 6.2
Change-Id: Ib9451b8eed86fe3ade4a4dcaf0037e1a3450321c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-07-28 09:44:01 +00:00
|
|
|
<Incident type="fail" file="" line="0">
|
2012-02-01 05:42:00 +00:00
|
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
|
|
<Description><![CDATA[QEXPECT_FAIL was called without any subsequent verification statements]]></Description>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-02-01 05:42:00 +00:00
|
|
|
</TestFunction>
|
2012-02-01 04:33:42 +00:00
|
|
|
<TestFunction name="xpass">
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xpass" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-02-17 05:11:20 +00:00
|
|
|
<Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description>
|
2012-02-01 04:53:33 +00:00
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-02-01 04:53:33 +00:00
|
|
|
</TestFunction>
|
2012-02-20 00:15:57 +00:00
|
|
|
<TestFunction name="xpassDataDrivenWithQVerify">
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xpass" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-02-01 04:53:33 +00:00
|
|
|
<DataTag><![CDATA[XPass]]></DataTag>
|
2012-02-17 05:11:20 +00:00
|
|
|
<Description><![CDATA['true' returned TRUE unexpectedly. ()]]></Description>
|
2012-02-01 04:33:42 +00:00
|
|
|
</Incident>
|
testlib: Count passes, fails and skips consistently.
For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.
This commit makes testlib count one pass, fail or skip for each data
row. Test functions that are not data-driven count one result for the
test function, as before. Benchmark tests count one pass, fail or skip
per iteration.
A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed. Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.
The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass. Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.
Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
2012-02-02 07:08:44 +00:00
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Pass]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-02-01 04:33:42 +00:00
|
|
|
</TestFunction>
|
2012-02-20 00:15:57 +00:00
|
|
|
<TestFunction name="xpassDataDrivenWithQCompare">
|
2016-07-29 11:18:24 +00:00
|
|
|
<Incident type="xpass" file="qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="0">
|
2012-02-20 00:15:57 +00:00
|
|
|
<DataTag><![CDATA[XPass]]></DataTag>
|
2012-02-29 05:43:42 +00:00
|
|
|
<Description><![CDATA[QCOMPARE(1, 1) returned TRUE unexpectedly.]]></Description>
|
2012-02-20 00:15:57 +00:00
|
|
|
</Incident>
|
|
|
|
<Incident type="pass" file="" line="0">
|
|
|
|
<DataTag><![CDATA[Pass]]></DataTag>
|
|
|
|
</Incident>
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2012-02-20 00:15:57 +00:00
|
|
|
</TestFunction>
|
2011-04-27 10:05:43 +00:00
|
|
|
<TestFunction name="cleanupTestCase">
|
2011-08-30 09:54:32 +00:00
|
|
|
<Incident type="pass" file="" line="0" />
|
2016-07-29 11:18:24 +00:00
|
|
|
<Duration msecs="0"/>
|
2011-04-27 10:05:43 +00:00
|
|
|
</TestFunction>
|
2013-10-24 18:10:37 +00:00
|
|
|
<Duration msecs="0"/>
|