Unit Testing with CB, MXUnit, and Eclipse

Ya,

I would try your tests from the URL and see if that works, always best to eliminate variables.

Curt

Hi guys,

I finally got around to digging into this tonight, and was able to get more detail by running the test using the MXUnit web interface.

The stack trace indicates:

Variable Application is undefined.....occuring at line 132 in /Library/WebServer/Documents/frameworks/coldbox/system/testing/BaseTestCase.cfc (132)

<!--- tearDown --->
  <cffunction name="tearDown" hint="The main teardown for ColdBox enabled applications" output="false">
    <cfscript>
      structDelete(application,getColdboxAppKey()); ---------- 132
    </cfscript>
  </cffunction>

Any ideas? Thanks for your assistance.

Nolan

Yes, you need to define an Application.cfc for your tests that has the application scope enabled. This is a tricky part, if you are running it via the web browser. If running via eclipse, make sure you are using the altest coldbox test templates as it has the remoteFacade.cfc next to a testing Application.cfc to enable this.

Hi Luis,

Thanks for your email. I was originally running my tests using the RemoteFacade.cfc within eclipse. Remote Facade is in my test/resources directory and Application.cfc is above that directory. When I run the tests in eclipse I receive errors that indicate:

coldfusion.xml.rpc.CFCInvocationException: [coldfusion.runtime.AbortException : null]

So I'm not sure if this is the same error that I see when running the tests in the web UI. MXUnit in eclipse doesn't really provide very much detail.

Thanks.

Nolan

That mean there is a cfabort somewhere