- A global find'n'replace to change org.cfcunit.framework.TestCase to mxunit.framework.TestCase.
- Global find'n'replaces to change assertEquals{String|Number|Struct}( etc to assertEquals( - MXUnit uses a generic assertion rather than type-specific assertions.
- Dropping the test suite objects - MXUnit runs all tests in a directory or you can elect to run a specific test so it does not (currently) support test suite objects
MXUnit
March 8, 2008 · 13 Comments
As many folks know, I've long been an advocate of Paul Kenney's cfcUnit unit testing framework. I felt it offered the most solid code base and the best all-round feature set in a package that was idiomatic for ColdFusion developers. Unfortunately, the website has not been updated in over 18 months and, although a new build was made available on sourceforge.net a year ago (1.2.0 Beta 1), there has been no progress on integration with Eclipse.
Since unit testing has become an increasingly important part of any project that I work on, I've had to review what else is available. Right now, the best of breed for ColdFusion seems to be MXUnit.The documentation is still somewhat thin, albeit somewhat better than cfcUnit, but it has a rock solid ant integration and a very slick Eclipse plugin, as well as a very convenient way to automatically run any unit tests found within an entire directory tree.
I've switched.
What was involved in switching from cfcUnit to MXUnit?
Tags: coldfusion · tdd

13 responses so far ↓
1 Jim Priest // Mar 8, 2008 at 5:22 PM
http://experts.acrobat.com/p89509280/
2 Peter J. Farrell // Mar 8, 2008 at 6:29 PM
3 Mike Harman // Mar 8, 2008 at 9:52 PM
4 Rachel Maxim // Mar 9, 2008 at 7:35 AM
5 Kurt Wiersma // Mar 9, 2008 at 8:25 AM
6 Sean Corfield // Mar 9, 2008 at 10:51 AM
7 Rachel // Mar 9, 2008 at 11:43 AM
8 Sean Corfield // Mar 9, 2008 at 3:38 PM
9 Ryan McIlmoyl // Mar 10, 2008 at 5:40 AM
10 Aaron Longnion // Mar 10, 2008 at 6:33 AM
FYI - to those of us migrating from CFUnit to MXUnit: you simply have to copy your CFUnit test CFC files to a MXUnit directory with the MXUnit-style run.cfm, and then update the Extends as Sean points out above, and then add cfset setTestStyle("cfunit") somewhere in your Test CFCs (see the sample at /mxunit/PluginDemoTests/SubDir/CFUnitStyleTests.cfc). Voila... easy and quick transition. ;-)
11 Ryan Stewart // Mar 28, 2008 at 8:08 AM
12 kevin // Jan 5, 2009 at 7:11 AM
13 Sean Corfield // Jan 5, 2009 at 8:17 AM
Leave a Comment