Home

testMXUnit (FarCry Unit Testing Framework)

The FarCry unit test framework is based on the MXUnit testing framework for ColdFusion. testMXUnit includes FarCry framework specific hooks from a wonderful "test run" UI, to specific functions for setting up and tearing down FarCry specific constructs. testMXUnit also integrates the Selenium test framework, to allow browser based tests to be performed.

If you are reading this from within the plugin as the README.pdf, and any of this fails for you, please see https://farcry.jira.com/wiki/display/TEST for the latest information about testMXUnit.

Installation

Get the code base

Farcry unit tests uses http://mxunit.org/ with a wrapper that adds in Farcry hooks and webskin compatibility.

You can get the latest copy (or an earlier version) of the plugin by checking out the code from the following SVN repository URL:

https://farcry.jira.com/source/browse/TEST

Add a Virtual Directory (IIS) or Alias (Apache)

Once you have the code checked out into your plugins folder, you will need to add an Alias (in Apache) or a Virtual Directory in IIS. For example, the path should be similar to the following:

Alias /mxunit /Users/username/Sites/blarg/Yadda/plugins/testMXUnit/www/mxunit

Note the path goes in one level deeper than most Farcry alias'.

Register the plugin with your application

You will then need to add the plugin to your plugin list in your www/farcryConstructor.cfm file. For example:

<cfset THIS.plugins = "farcrypoll,farcryradiostar,farcrycms,farcryverity,testMXUnit" />

Deploy the mxTest content type

You will then need to deploy the mxTest ContentType. You can do this in the webtop in the Admin tab. Select Developer Utilities from the pull down, and then click on the Types link under the COAPI Tools heading. Scroll down until you see mxTest and click the deploy link.

Finally, you will need to run updateapp on your application.

You are ready to write and run tests.

Running Tests

To run unit tests, log into the webtop and choose the Admin tab. From the pull down select Testing. This will display two menu options Run Tests and Configure Tests.

Configure Tests

You select which tests you would like to run on the Configure Tests screen. After you have ticked the boxes next to the CFCs you'd like to run (and click Save Configuration), you can then proceed to Run Tests.

Run Tests

Run Tests Does what it says on the tin - it runs the tests selected from the Configure Tests screen.