Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Navigation Map
testmxunit
testmxunit
titleTable of ContentsWriting Tests

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:

No Format
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:

No Format
Alias /mxunit /Users/username/Sites/blarg/Yadda/plugins/testMXUnit/www/mxunit
Note

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:

No Format
<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.

Image Added