News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Unit testing output

Started by Revvy, April 21, 2008, 02:14:50 AM

Previous topic - Next topic

Revvy

I've recently integrated unit-- into one of my projects, and I'd love to get it integrated into the message output when I run my tests, giving clickable errors just like the compiler output.  Is this possible?  The messages themselves are easy to parse, I just don't know where this would go (a plugin?  a tool?  You tell me!)

Quote from: unit--X
messageTest
C:\dev\Denkatsu\graphNodes\tests\testGraphNodes.cpp:60: Assertion failed: <!node->sendMessage(msg) && "Message should have been received and processed">
X
connectTest
C:\dev\Denkatsu\graphNodes\tests\testGraphNodes.cpp:47: Assertion failed: <f.movieFile->dest() != f.movieClip && "Destination should be set after connection">
.
2 cases failed
Total 3 test cases
0 sec.
Cheers,
Revvy

Greatwolf

well one possibility is to set your project up to automatically run the unit tests after a successful build -- under post build section. The unit test results will show in the build log like any other. From there you can have C::B just parse it into the Build messages. Goto Settings->Compiler debugger settings->Other settings->Advance options->Output parsing. From there just define a new parsing regex that describes how to parse the messages from your unit test.

If anyone have any other suggestions, comments or another way to do it please add them here.

killerbot

Hi,

have a look here : http://wiki.codeblocks.org/index.php?title=UnitTesting

You just have to make sure that your unit test framework gives its output in gcc compiler messages style.