I can only talk about F / W 1, since I did not use CFWheels (some information is in another SO question here ), but in my opinion unit testing can be simplified by using the service level correctly .
The idea is that you test service-level objects with MXUnit and leave the infrastructure controllers (like FW / 1) very light. In fact, controllers simply pass parameters to the service level, receiving a response back and displaying the view.
We believe that the structure is the least likely place where you introduce errors, so concentrate your testing on the service object, that is, on the main business logic of your application.
Interestingly, structures other than ColdFusion (such as Grails ) do not test the structure, tests ("domain classes" in grails that model the data) and your service objects are created for your model, but it is assumed that the structure works fine. The idea there - again - is to get the logic out of your controllers and test your service level and domain model.
I hope this helps.
source share