||The topic of this article may not meet Wikipedia's general notability guideline. (July 2013) (Learn how and when to remove this template message)|
MXUnit is a unit testing framework for CFML developers, modeled after other xUnit frameworks (JUnit, etc). MXUnit honors the major XUnit conventions but deviates and enhances to provide a more enjoyable, idiomatic CF test experience.
MXUnit was first released in 2007. As of 2013 the current version is v2.1.3  It is the most widely used Unit testing framework in the Coldfusion, Railo and Lucee communities, many examples can be found today not only on the projects website but also on many popular ColdFusion blogs 
MXUnit Assertion Example
The below Asserts true if the desired condition is met, otherwise it'll return false indicating the test has failed.
<cffunction name="clearPrivilegesShouldClearPrivilegesFromObject"> <cfset obj = createObject("component","myObject")> <cfset obj.addPrivilege("EditUsers")> <cfset assertTrue( StructCount(obj.getPrivileges()), "Guard assertion: Ensure we're starting out with privileges before testing clearPrivileges()")> <cfset result = obj.clearPrivileges()> <cfset assertTrue( StructIsEmpty(obj.getPrivileges()), "clearPrivileges Should Have Emptied The Structure of privileges but didn't" )> </cffunction>
- HTML Format
- ExtJs Format (deprecated)
- XML Format
- JUnit Report XML
- ColdFusion Query Format
- ColdFusion Array format
Platforms and license
Versions 1.x are licensed under GPL and versions 2.x are licensed under the MIT open source license.
CFUnit - an alternate unit testing framework for CFML.
JUnit - JUnit, what MXUnit is modeled after.
|This computer-programming-related article is a stub. You can help Wikipedia by expanding it.|