The Plugin can run any TestCase components that live in configured Eclipse projects. This is important: If the TestCase lives on your file system, but is not part of an Eclipse project, the plugin cannot run it as a test! This follows the expected Eclipse behavior: it has no notion of code living outside of projects.
You can run tests in three different ways in the plugin:
In addition, once a test is run, it is added to the Test History. You can access the test history by clicking the History icon () dropdown and selecting a previously run Suite. This will load the tests into the view but will not automatically run them.
Once a Test is run, it retains certain data. Re-running a test overwrites its data with the new test results. Sometimes, you want to clear the data without actually running the test. To do so, simply click the "Reload" icon () or hit F5.
This is mostly useful when you've run a test case component, then you add, remove, or rename test functions. Rather than right-clicking the file in the navigator view and running it again, you can just Reload the test from the view. This will load in the or renamed methods and remove the deleted methods. You can now pick which methods you want to run.
Currently, the plugin (and the framework) recognize a test as any file named Test*.cfc or *Test.cfc.
A TestCase | Not a TestCase |
---|---|
SomeTest.cfc | SomeTest.cfm |
SomeTest.cfc | SomeTests.cfc |
TestThisThing.cfc | ThisThing.cfc |
sometest.cfc | TestYouGetThePicture.html |
TestCase selection is not case sensitive.
Inside of a TestCase component -- specified as a component that extends mxunit.framework.TestCase -- the MXUnit framework will run any public method as a test, regardless of its name! The framework will NOT run protected or private methods as tests.
Next: Running the Demo Tests