Getting Started: Configuring Global Preferences
The preferences
There are 2 global preferences:
- Remote Facade URL
- Method Timeout
Why
This plugin works by making soap (i.e. webservice) calls to a URL. By default, that URL is to a RemoteFacade.cfc that
comes bundled with the MXUnit framework. When you first installed the plugin, it made a reasonable attempt at
guessing the location of this Remote URL, but more than likely it guessed wrong... so you'll need to set it up correctly.
Regarding Method Timeout: The plugin makes a separate call to CF for every single test method. The Method Timeout setting allows you to specify a maximum amount of time, in seconds, the test runner should wait for a single test method to complete. If a method call does not complete in the time specified, the plugin stops trying and moves on to the next test method. You can use a setting of "0" seconds to specify NO Timeout. The default setting is 30 seconds, which would allow an extremely long-running test.
How
- Window -- Preferences -- MXUnit
- Check and correct the URL if necessary. For example, maybe it currently reads "http://localhost/mxunit/framework/RemoteFacade.cfc"
but your CF installation is at localhost:8501. Change the URL accordingly.
- Set any value between 0 and 180 for the method timeout.
In addition, the method timeout can be changed by clicking on the dropdown triangle to the right side of the MXUnit view and clicking the "Change Timeout Preference" menu item. From there, enter your desired value.
Overriding these preferences for special cases
There are times when these preferences won't suit your needs:
- You need custom remote functionality. For example, you need the RemoteFacade.cfc to include a custom Application.cfm file for every test
- You're testing components that use ColdFusion's built-in Hibernate ORM. In those cases, the components will not work correctly if they aren't run under the context of their Application.cfc.
In these cases, you'll need to override certain properties at the project level.