Posts Tagged ‘cunit’

CUnit Tests in Hudson

Posted in Development on May 18th, 2009 by Oliver – 2 Comments

Since I needed to parse the results of some CUnit tests in Hudson in a recent project, I came up with the following transformation which I apply to the cunit xml result file.
Hudson can then evaluate the results as if they were generated by JUnit. The same approach is basically used in the CppUnit Plugin for Hudson – which is where I got the idea.
Since I’m too lazy at the moment to write my own plugin for Hudson, I figured running xsltproc after running my tests will be good enough:

xsltproc-win32\xsltproc.exe --stringparam suitename testall -o testall_results.xml cunit-to-junit.xsl cunit_testall-Results.xml

To make CUnit produce XML results, you have to do something like this:

  CU_set_output_filename( "cunit_testall" );
  CU_list_tests_to_file();
  CU_automated_run_tests();

You can download the cunit-to-junit.xsl here.

read more »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes