embUnit Translators for CruiseControl

Back home and time to get tech oriented again. Our CruiseControl and unit test practices are proceeding at steady pace, so I thought I will make our XSL translators for embUnit unit test framework public in this forum at this point. You can find them here (unittests.xsl and testdetails.xsl). If you are an embedded programmer like me, and do not currently know much about CruiseControl, and/or XML, I'll try to briefly explain how to set it up. If there is enough interest I will make a more detailed intro to it.

You need at least to have following installed:

  1. embUnit unit test framework and compiled libraries
  2. Java SDK. Remember to set JAVA_HOME environment variable to point to install dir.
  3. CruiseControl, of course
  4. Make tools. I recommend for Windows users the whole Cygwin installation to cut down the hassle

Now you can run the Cruisecontrol Ant built Java and JUnit sample, but before you can start cruising with your embedded C project with Make and embUnit framework you need to at least do following modifications:

  1. Build a simple C project which has makefile for automated build. Greate a CVS project and check your project out to your build server for CruiseControl (use Subversion if you are ahead of us, but you are on your own with this). Look at Driving on CruiseControl articles by Lasse Koskela for help.
  2. Modify our config.xml to suite your project (see my earlier post about it) and replace the file in CruiseControl root
  3. Replace unittests.xsl and testdetails.xsl files in CruiseControl folder ./webapps/cruisecontrol/xsl.
  4. Launch CruiseControl and start cruising...

And here are some screenshots on how it looks.

Here a test fails (purely for demonstration purposes of course). Details of failed test are displayed below.

Details of all tests are also available.

After a brief moment everything is in order again. I used the green bar to signal this.


Michael Langford said...

What sort of system were you testing with embUnit? Was it embedded? Was the code cross compiled, or was it running natively.

SergeyProgrammer said...

It works nice, but how to see the unit tests results in dashboard? I see "Test Suites (0)" message only..


Timo said...

You can find a more detailed description of setting up the server at:


The information may be a bit outdated as CruiseControl has gone forward, while I have only been thinking about updating the site.