c++ - How can the Qt Test framework be used for real world projects? -
coming other testing frameworks such google test, i'm used having tests run @ same time failed test cases listed @ bottom. while managed find way conveniently register test classes single executable project, test output doesn't seem maintainable @ all. each test class run grouped different section in console output. if have 100 test classes , test fails, end scrolling find test failed. example, 2 test classes following output:
********* start testing of test_rule ********* config: using qttest library 5.4.2, qt 5.4.2 (i386-little_endian-ilp32 shared (dynamic) debug build; gcc 4.9.1) pass : test_rule::inittestcase() fail! : test_rule::property_path() crap w:/googledrive/code/dev/danwatkins/testbed/autocleaner/tests/test_rule.h(20) : failure location pass : test_rule::cleanuptestcase() totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted ********* finished testing of test_rule ********* ********* start testing of test_autocleaner ********* config: using qttest library 5.4.2, qt 5.4.2 (i386-little_endian-ilp32 shared (dynamic) debug build; gcc 4.9.1) pass : test_autocleaner::inittestcase() pass : test_autocleaner::cleanuptestcase() totals: 2 passed, 0 failed, 0 skipped, 0 blacklisted ********* finished testing of test_autocleaner *********
so there way output group each test class same "run" call. ideally example this:
********* start testing of ********* config: using qttest library 5.4.2, qt 5.4.2 (i386-little_endian-ilp32 shared (dynamic) debug build; gcc 4.9.1) pass : test_rule::inittestcase() pass : test_rule::cleanuptestcase() pass : test_autocleaner::inittestcase() pass : test_autocleaner::cleanuptestcase() fail! : test_rule::property_path() crap w:/googledrive/code/dev/danwatkins/testbed/autocleaner/tests/test_rule.h(20) : failure location totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted ********* finished testing of *********
note make use of autotest class this blog post. project using qmake.
Comments
Post a Comment