Download to get rid of those pesky bugs.             MXUnit Unit Testing framework for ColdFusion developers                               Download       Details       Home       Support       Blog

Running single test methods

When implementing new functionality or fixing a bug in an existing component, you often want to focus exclusively on that task. You may want to code what you need to code, see what you need to see, without the noise of your other tests in the same test case. Typically, this is tough when unit testing CF if the framework doesn't support method-level testing.

MXUnit makes testing at the method level a core concept. The eclipse plugin for MXUnit and the browser runners all make it easy to test single methods.

Eclipse Plugin

Using the eclipse plugin is documented elsewhere very thoroughly. In addition, there is a help icon in the MXUnit view that will take you to the appropriate documentation. So I don't want to repeat all that.

In a nutshell, in the plugin, browse to any test (hit CTRL-F to search for tests). The test and its test methods will load. Select any combination of methods and hit Enter. Voila... method-level tests.

Browser Runner

Run any test in the browser runner. All tests will run and you'll get a list of test methods.

When the results load, click the link for any test method. This is what you'll see: