Results 1 to 2 of 2

Thread: Qt test application

  1. #1
    Join Date
    Oct 2007
    Posts
    21
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Qt test application

    hello all,

    first of all let me explain my problem,

    wht traditionally do in a typical test application is that we just hard code that function name, its input and compare its output with the expected output using macro QCOMPARE.

    i have to develop a test application in which, i have to take input from a text file containing function name, input and expected output sapareted by tab...

    so can any body tell me how to do this using QtTest module.. or is there any other alternative... ???? if possible thn pls send me demo example...

    Regards
    Kunal Nandi

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: Qt test application

    Take a look at data driven testing:
    http://doc.trolltech.com/latest/qtestlib-tutorial2.html
    You can generate test vectors from a file, provided that the methods you want to test are callable through QMetaObject::invokeMethod(). If they are not, I suggest you write a small application that will take your input files and generate C++ code that uses QTestLib to perform the tests. Then you can include and compile such code into the final testing executable.

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

    kunalnandi (12th October 2007)

Similar Threads

  1. Distributing QT application for Mac OS
    By mb0 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 19:59
  2. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 19:37
  3. Replies: 3
    Last Post: 8th December 2006, 19:51
  4. Replies: 3
    Last Post: 31st March 2006, 19:38

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.