ColdFusion and ColdBox unit testing with SES URL's
Tags: Test Driven Development, Coldfusion, Coldbox
I wanted to give a very quick post on how to run your unit tests in a ColdBox and / or ColdFusion Application when using SES URL's.
Before I mention how this is done, I want to explain my setup so that you get a feel for how I do it. When I am using ColdFusion Builder I usually have my project underneath the webroot, so that I have a folder called wwwroot which is where my IIS or Apache is mapped too.
In this project I also have in the project root and underneath the wwwroot, two directories for unit testing which include the mxunit and unit tests themselves. In IIS or Apache I then have a virtual mapping to these directories, so that they can be run from the URL and from with ColdFusion Builder.
Now if you have tried to run the test with a project that is using SES URL's then you will know that it will not work the way you think it will, instead especially in ColdBox it will throw an error of the sort unknown event handler.
The fix is rather easy and as I use the ISAPI rewrite from Helicon, then all one needs to do is this in the rules.
So this is basically saying that anything that is in the mxunit and or unittests will not be rewritten, it is that simple.
There are no comments for this entry.



TweetBacks