Unit Testing with ColdBox

Hi Luis,

Can you point me in the direction of some resource about unit testing with CB?

I was thinking along the lines of CFunit or CFCunit (or is it unitCFC)
And also being able to use the unit test plug-in for cfEclipse.

Any tips?
How do you go about unit testing for your applications?

Thank You


I have only been exposed to cfcUnit and think it is good. I use their html runner and the eclipse plugin. In order to make the eclipse plugin work, you need to download sean’s CFEclipse facade at: www.corfield.org

As for testing the event handlers, the base tests are provided in the Application Template for your use. One thing to note in event handler unit tests, is that make sure you test events that do not relocate, if they do, well, you basically relocate the browser, so it will fail. So I usually test them before I include my relocation code.

The main part that needs to be unit tested should be your domain model. Hope this helps. As soon as I try cfUnit, I will give you my opinion.


New Guide:


Great article Luis - no more excuses indeed!!

Will there be a follow up article how to integrate with cfEclipse using Sean Corfeld’s facade?


Good idea AJ!!

Will do!!!