PDF Print E-mail

Compass Version1.1

<< prev
 TOC 
next >> 

Adding a PyUnit Test Build Step

Now that we have a CVS build step in place to check out our python project, we need to add a build step to run our unit test suite.  This method of adding a build step and running a unit test parser on the output works for all unit test suites.  The first thing we do is add a 'PyUnit Execute' script that runs unittest.py and we give it the modulename and test suite name in the build step arguments.  This looks like this:

This build step only executes the PyUnit test runner, it doesn't parse the output to see if there were errors.  To parse the output we have to open the Details dialog and tell Compass which unit test parser to use.  The details dialog is the magnifying glass icon and when we click it we get this dialog:

 

 

As you can see, we set the 'UnitTest Parser' drop down to PyUnit Test Parser.  Now when the build executes Compass will parse the output of the build step with this unit test parser and if any tests fail then Compass marks the build step as failed (or as a warning if we set the 'On Fail' option in the details dialog to 'Warn and continue'.  And that's it, we save our build plan and we are done.

 

 

bottom
top
Copyright © 2010 Anx Labs. All Rights Reserved.
Anx Labs Inc. - 2251 Double Creek Dr. Ste. 604, Round Rock TX 78664 - 1-888-900-6819
bottom