Generate separate reports per test with QtTestLib
Running QtTestLib test generates on result file per default. This behavior could be changed by passing a modified argument list to the QTest::qExec
method and facilitating the QMetaObject
s capabilities for infrastructure 'introspection' to generate test referring file name.
QStringList newArgs = QStringList(arguments);
newArgs.append("-o");
newArgs.append(QString("xunit-result-%1.xml,xunitxml").arg(testClass->metaObject()->className()));
int result = runTest(&loginCmdTest, newArgs);
You find more information at my blog entry: http://blog.mindcrime-ilab.de/2014/03/06/creating-class-level-xunit-report-files-with-qttestlib/
Written by Michael Engelhardt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Cpp
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#