Search code examples
c++qtqtestlib

QTest::qExec Hide "passed" messages


I'm new in Qt and QTest. I use QTest::qExec(&someMyTestClassObject) to run my tests. Is possible to hide "PASS : MyClass::myTest" messages? Of course i want to see all "FAIL" messages and statistics Sorry for my poor English


Solution

  • I'm not sure if it works with QTest::qexec, but with the default QTest executable generated with QTEST_APPLESS_MAIN(MyTestClass) you can run tests with the parameter -silent.

    From the help-text:

    -silent    : Only outputs warnings and failures