Add testlib selftest for counting of test results.
authorJason McDonald <jason.mcdonald@nokia.com>
Tue, 31 Jan 2012 04:07:58 +0000 (14:07 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 2 Feb 2012 04:42:07 +0000 (05:42 +0100)
commit58c617c798c0d0db244735451acd316306068491
tree6cc2ee72fc0f0802d3034bb6573a1d8fb841f6e1
parent835c53490b4fa9a248e6e4ca56965f9f7276da4d
Add testlib selftest for counting of test results.

The test simply generates each possible pair of Pass, Fail and Skip
results.  At present the test simply serves to demonstrate the current
shortcomings of testlib's plain text logging, namely:

* If a test function passes for all data rows, that is counted as one
  pass, but each skipped or failed row counts as one skip or fail.

* Only skipped and failed rows are reported individually in the test
  output. Passed rows are not reported, so it is impossible to see how
  many rows were executed.

* A skip followed by a pass will be reported as an overall pass for the
  test function, but the same rows in reverse order will not report any
  overall result for the test function.

Future commits will attempt to correct these problems.

Task-number: QTBUG-22124
Change-Id: If8c7ea15fc43ba9a1bccd0e881c1efc18e705b25
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/testlib/selftests/counting/counting.pro [new file with mode: 0644]
tests/auto/testlib/selftests/counting/tst_counting.cpp [new file with mode: 0644]
tests/auto/testlib/selftests/expected_counting.lightxml [new file with mode: 0644]
tests/auto/testlib/selftests/expected_counting.txt [new file with mode: 0644]
tests/auto/testlib/selftests/expected_counting.xml [new file with mode: 0644]
tests/auto/testlib/selftests/expected_counting.xunitxml [new file with mode: 0644]
tests/auto/testlib/selftests/selftests.pri
tests/auto/testlib/selftests/selftests.qrc
tests/auto/testlib/selftests/tst_selftests.cpp