Using Rowley Crossworks in a Test Driven Development (TDD) Workflow




  • Avatar
    Bruce Chippindale

    Might be easier in the linux than in the windows environment.   I am struggling to find a way to do this and it is pushing me back to linux because you have more control there.   This is dead inconvenient as the GUI for the system is all on the windows side, and I am responsible for both.

    Grrr!!!  Should have set up VMs on the development hardware, except that the GUI won't run in the VM either... and I am not sure that the drivers for the debugger and the J-link are going to work in one. 


  • Avatar
    Michael Johnson

    For what it's worth I run tests from crossstudio using crossbuild in a post-link command. The crossbuild output goes to the output window and if formatted like the compiler output can be located to in the text editor.



  • Avatar
    Bruce Chippindale

    That's helpful.. soon as I find the tools... new to this particular environment. 

    Thinking at the moment that I am barking up the wrong tree a little.    Moving to test-driven in an embedded cross-compiling environment, for some micro, isn't going to be about just porting code.  It is IMHO, essential to have some standard sample of the hardware target(s).    In other words, the tdd does not work  the same as  developing  a java application to run on Apache or Android. 

    Can be done but HAS to have specific HW support.


  • Avatar
    Richard Willis

    As an update I should say that I have had some success using EmbUnit as a TDD framework with crossworks. I built a custom I/O library for this framework, to use the JTAG debug serial port as the test result interface (using debug_printf() et al). Seems to work nicely though the tester has to manually change the test case group then re-compile. It could be used for code development. The static library for EmbUnit is ~ 18KBytes.

    I have done more recent TDD projects on windows (Visual Studio) with GoogleTest. The secret to doing this is to create a lot of Mock classes, functions etc surrounding the code under test. This method is a lot more rapid as the developer does not have to download anything to a target, and I setup Visual Studio to run the tests as a final part of the build. The downside is the need to build all of the Mock functions to support the code under test.

    We do use the dos-based crossbuild command for our nightly build, as part of our CI system (Jenkins) and it seems to work fine for that.



    Hope this helps.

     - Richard

  • Avatar
    Kevin Townsend

    I've had a fair amount of success using Unity ( since it's relatively easy to understand, and light weight, and can also be configured to run on native HW if necessary.  But having the test results integrated right into the CW IDE would be a pretty big plus rather than having to go to external tools.

  • Avatar

    I do all my unit testing in Qt Creator. It is cross platform and it has a testing library built in. In my C++ test file I include C files with:

    extern "C" {

    #include "xxx.c"


    This gives me access to all the contents of the C file including statics.

    I use this for unit testing and functional testing. Unit Testing C code with Qt Creator

Please sign in to leave a comment.