New MXUnit Ant Automation Video

Tuesday, March 25, 2008

We wanted an efficient way while building MXUnit (and other projects) to frequently update local working code from the repository, run unit tests, and commit the changes back. This should be fast and the commit should only happen if all source code conflicts are resolved and especially if all tests pass. It's very simple to implement and it may very well be one of the most useful implementations of the ant task we have to date. Check it out ... and forgive my total lack of ability to speak at God awful early hours before real work. Let me know if there's any annoying browser problems - I'm new to this software demo stuff. thanks, bill


Jim said...

Great stuff!!! I've added it to my Ant wiki page:

bill said...

thanks for the kudos, jim ... i'm bummed i missed your ant preso at cfmeetup! i heard it rocked ...


Marc Esher said...

dude... that's what the archives are for!

I'm setting up a time next week to show it to all the people i work with.

Indy Nagpal said...


I've been using cfunit for testing. Was playing with mxunit today and found it really nice.

I quite like the way one can use Ant to automate testing with mxunit.

But I can't find information on one aspect. In cfunit, one can setup a builder in Eclipse to automatically run test as you save the test files (

Is there a way in mxunit to do the same? I found documentation on the mxunit ant task, but that seems to output information to a directory rather than print it out in the console.



bill said...

Hi Indy,

Thanks for the kind words! This might also be a good topic for the mxunit google group ( But until then, this is what I would do:

The MXUnit Ant task can just print info to the console only and not generate any files. Just omit the outputdir attribute in the task definition; e.g., <mxunittask server="localhost" ... >

As for configuring Eclipse to run your Ant build file on save, I would imagine that the same directions provided by cfunit would apply to mxunit, as that is really just calling Ant on an Eclipse save event, I think.

Personally, I do not do that because I do frequent saves and my test directories get pretty big. So, I opt to run my tests when I'm ready to commit to the repo or deploy, and not when saving changes to disk. But that's just me ...


Indy Nagpal said...

Thanks Bill. What you suggest works. I had create a build.xml that contained the right tasks.

But you are quite right about why running all tests after save is a bit redundant. Now that I can individually run my tests by double-clicking them in the mxunit view, there is really no need to run all tests on each save.

Thanks for your quick response.