PDA

View Full Version : qttest output



BalaQT
25th May 2011, 15:37
Dear Experts,
Im working in ubuntu , Qt4.7.
Im using the QtTest for testing my application and for automated GUI stimulation.
I have distributed the tests in 3 files. and main() will execute the test.

1)Im getting the summary of the indivdual test script output as bellow ,

test 1:
passed :5 failed:1

test 2:
passed :2 failed:0

test 3:
passed :5 failed:0

Is there any way to accumulate the overall test results in the test output.
for ex;

Consolidated:
passed :12 failed:1

2) Can I add my own texts like test Description , test id in the test output?


testID:123 //mytext
testDesc:myDesc //mytext
PASS : testDB::testDatabaseOpen() //Qt genereated automatically


3) I tried qDebug for showing description and test id in test output.

for ex: if I add
qDebug()<<"mydescription";

Im getting
QDebug():mydescription in the debug output .

How to remove the text 'QDebug()' in the debug output?

Thanks in advance,
Bala

wysota
28th May 2011, 08:51
You can generate a result in xml and then feed it to an external application that will process it and output in a form you require.

BalaQT
28th May 2011, 12:56
Thanks master, hmm i will try .I saw one of your post on getting output using 'tee'.

My test prg is like this,


main(..)
{
QApplication app(..);
test1 t1;
QTest::qExec(&t1);
test2 t2;
QTest::qExec(&t2);
convertOutput(); //Shall I hav a function like this for reading out the testoutput generated by tee?

}

Thanks,
Bala.

wysota
28th May 2011, 17:17
Have a look at the parameters you can pass to a test application. It's all explained in the docs.