Results 1 to 4 of 4

Thread: qttest output

  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qttest output

    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;
    Qt Code:
    1. Consolidated:
    2. passed :12 failed:1
    To copy to clipboard, switch view to plain text mode 

    2) Can I add my own texts like test Description , test id in the test output?
    Qt Code:
    1. testID:123 //mytext
    2. testDesc:myDesc //mytext
    3. PASS : testDB::testDatabaseOpen() //Qt genereated automatically
    To copy to clipboard, switch view to plain text mode 

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

    for ex: if I add
    Qt Code:
    1. qDebug()<<"mydescription";
    To copy to clipboard, switch view to plain text mode 

    Im getting
    Qt Code:
    1. QDebug():mydescription
    To copy to clipboard, switch view to plain text mode 
    in the debug output .

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

    Thanks in advance,
    Bala
    Last edited by BalaQT; 25th May 2011 at 16:02.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qttest output

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    BalaQT (28th May 2011)

  4. #3
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qttest output

    Thanks master, hmm i will try .I saw one of your post on getting output using 'tee'.

    My test prg is like this,

    Qt Code:
    1. main(..)
    2. {
    3. QApplication app(..);
    4. test1 t1;
    5. QTest::qExec(&t1);
    6. test2 t2;
    7. QTest::qExec(&t2);
    8. convertOutput(); //Shall I hav a function like this for reading out the testoutput generated by tee?
    9.  
    10. }
    To copy to clipboard, switch view to plain text mode 

    Thanks,
    Bala.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qttest output

    Have a look at the parameters you can pass to a test application. It's all explained in the docs.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Extending QtTest lib
    By davif in forum Newbie
    Replies: 5
    Last Post: 4th November 2010, 19:45
  2. QtTest and asserts
    By doberkofler in forum Qt Programming
    Replies: 11
    Last Post: 21st September 2010, 07:22
  3. QTTest and my own gui
    By GrahamLabdon in forum Newbie
    Replies: 0
    Last Post: 19th March 2010, 10:26
  4. QtTest example not compiling
    By GrahamLabdon in forum Newbie
    Replies: 3
    Last Post: 19th March 2010, 09:41
  5. QtTest bug
    By graeme in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2006, 21:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.