I’ve read what documentation I could find, but I am left with some very fundamental questions. I don’t know how to actually run my tests. I running CB 3.0.0 M5 and CF9 on WinXP. From reading the documents, I presumed I could simply run the GeneralTest without any modification other than to AppMapping. When I go to http://127.0.0.1:8500/owners/test/integration/generalTest.cfc?method=runTestRemote I get an error stating Could not find the ColdFusion component or interface mxunit.framework.TestCase. It is my understanding that CB incorporates MXUnit, so I believe this is not the correct way to run a test. Ideally, I want to be able to run a test interactively and to be able to run it via Ant. One step at a time. If I can do the former, I am likely able to figure out the latter. So, what is it I am missing? Do I need to install MXUnit?
I installed MXUnit and ran the test as below. It seems I am now calling MXUnit. However, I have a new problem. An error is repeatedly thrown - coldbox.system.logging.appenders.AsyncRollingFileAppender must implement the logMessage() method. Method logMessage is not present in my unit test, nor in the General.cfc handler (the latter never having been modified after the project was created). What is causing this exception? What must I do to rid myself of it?
You need top download MXUnit separately. ColdBox integrates with MXUnit but doesn’t include it. Once you’ve got the tests running in your browser I suggest looking at the Eclipse plugin as your next step
Yes, I did end up downloading and installing it. It made sense after I thought about it and did not find any jars or subdirs that seemed to contain this MXUnit. I’ve posted subsequently to this original post stating I had done that, but am now getting an exception and I do not understand why I am getting it - coldbox.system.logging.appenders.AsyncRollingFileAppender must implement the logMessage() method. That post is in thread [coldbox:4699] noob: testing throws missing logMessage method exception. I’ve checked the code and said message is implemented. I am assuming that once I get my simple test running in the browser, I can easily get it running in Eclipse and Ant (I think I will actually be using Gant for my client has no experience with automated testing and scripts and I believe Gant is easier to understand than Ant for a newbie, but that is beside the point).
I’ve just tried generating a new ColdBox 3 app (using the CF Builder extension) and ran the generated test (for the General handler) and it worked for me. I am using the latest version of ColdBox from svn so it might be worth pulling the latest version.
Well, oddly enough, this works just fine this morning. The only thing that likely changed is that I had shut down the server (shut down my computer, in other words) over the weekend. I hadn’t re-booted after installing MXUnit, so perhaps that was needed.
Thanks for your help!