Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
5.0.0
-
None
Description
In qtsystems/tests/auto/qvaluespace_jsondb/tst_valuespace_jsondb.cpp, there are three test objects:
int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); TestJsonDbPath pathTest; TestJsonDbHandle handleTest; TestJsonDbLayer layerTest; return QTest::qExec(&pathTest, argc, argv) \ & QTest::qExec(&handleTest, argc, argv) \ & QTest::qExec(&layerTest, argc, argv); }
Using multiple test objects in a single test program is discouraged, as clarified by the following paragraph recently added to the documentation for QTest::qExec():
For stand-alone test applications, this function should not be called more than once, as command-line options for logging test output to files and executing individual test functions will not behave correctly.
In the qvaluespace_jsondb test, only the output for layerTest will be visible if the test output is logged to a file (as is done by several of Nokia's CI systems, which then parse the test output into a database) and it will not be possible to manually run the test with command-line options for running specific test functions.
If three test objects are needed (e.g. because the test is testing three classes or performing three different kinds of testing), a better approach would be to use three separate test programs, each containing one test object.