Sunday, July 19, 2009

Unit Test Results In The Application Output Pane

I would find it really useful if when displaying the results of a QTestLib app in the Application Output pane I could double-click on a FAIL! to jump directly to the test that failed. Once you have a lot of tests, this feature would prove to be a real time-saver. FWIW I have used the Boost.Test framework with MSVC in the past and you can do something similar.

For example, consider the following output from a test run (this is copied directly from the Application Output pane in Qt Creator):

********* Start testing of LogFileTests *********
Config: Using QTest library 4.5.1, Qt 4.5.1
PASS : LogFileTests::initTestCase()
FAIL! : LogFileTests::LoadFile() 'entries.last() == LogEntry("Test")'
returned FALSE. ()
LogFileTests.cpp(30) : failure location
PASS : LogFileTests::cleanupTestCase()
Totals: 2 passed, 1 failed, 0 skipped
********* Finished testing of LogFileTests *********

If I could double-click on either the FAIL! line or the line below (LogFileTests.cpp(30) : failure location) and jump straight to the test, I would be very happy.

2 comments:

  1. I totally agree with you. I also use boost.test + msvs08 and it would be very nice if this feature can be supported by Qt-Creator...

    Cheers
    jan

    ReplyDelete