Search code examples
coldfusionmxunit

application variables are not found when running MXUnit test from Eclipse


So I was following the tiny guide here on how to run a single MXUnit test with Eclipse using the MXUnit plugin for Eclipse. But as you can see in the screen shot below it didn't work out for tests that I know work, because it appears that the application variables are not available using this method. Is that something that will not work? or is there something that I can do to make that application and it's variables accessible when running tests this way?

Error when running a single test


Solution

  • Erik, you need to point to a custom RemoteFacade.cfc which you'll create and put in the directory where your tests live. This is fully described in the plugin's help, which you can access by clicking the green question mark icon in the MXUnit view.

    Click that icon, and then click the "Talking to ColdFusion: The RemoteFacade.cfc URL".

    Interestingly enough, your question is asked almost verbatim on the mxunit wiki: http://wiki.mxunit.org/display/default/Eclipse+Plugin+FAQ#EclipsePluginFAQ-Q%3AWhenIrunthetestsintheplugin%2CmyApplicationscopevariablesaren%27tpresent

    Definitely check the wiki, and in particular the FAQ page, when problems like this arise. Usually the FAQs will point you to the correct documentation which will help you solve these problems.