cfcUnit Facade for CFUnit Plugin
April 20, 2007 · 8 Comments
I've posted the facade CFC that lets you use cfcUnit with the CFUnit plugin for CFEclipse to the 'SOFTWARE' pod on my blog.
First, if you haven't already done so, install cfcUnit.
Second, if you haven't already done so, you need to install the new CFUnit plugin. In Eclipse, Help > Software Updates > Find and Install... and search for new features on the CFEclipse update site. You should see a CFUnit 1.0.4 plugin. Install that and restart your workspace.
Third, download my facade CFC and put it somewhere that is web accessible (I put mine in my webroot).
Then configure the CFUnit plugin to use that location, under Window > Preferences > CFEclipse > CFUnit. Specify the URL to the directory containing the CFEclipseFacade.cfc you just downloaded.
Finally, open the CFUnit view (Window > Show View > Other and select it from the CFML section).
Now you can enter a CFC path - or search for CFCs - and run them directly in Eclipse.
Tags: cfeclipse · coldfusion · tdd

8 responses so far ↓
1 Andrew Powell // Apr 23, 2007 at 5:29 AM
2 Matt Williams // Apr 23, 2007 at 6:31 AM
I have never used CFUnit or the plugin before. What sort of feedback should I expect? Does the version of CFC unit matter? It has probably been a while since I updated it.
Thanks,
3 Sean Corfield // Apr 23, 2007 at 11:22 AM
@Matt, hard to say what's wrong. If it was running correctly, you'd see green, orange or red output and the number of tests run, failed, error'd out. Did you set the CFUnit URL to the correct place? It should be the URL of the CFEclipseFacade.cfc but without the actual filename (so it's the URL of a directory). The CFC path you enter in the test panel should be the dot-separated name of the CFC you want to run and it must be a TestCase. Try org.cfcunit.samples.SimpleTest (a test provided with cfcUnit). I get 3 tests run, 2 failures, 1 error and in the tree view below I get "org.cfcunit.samples.SimpleTest (0/2/1)" in red and if I expand that node, I get "testEquals (Failure)" and "testAdd (Failure)" both in orange and then "testDivideByZero (Error)" in red.
4 Matt Williams // Apr 23, 2007 at 11:56 AM
5 Andrew Scott // Apr 25, 2007 at 8:22 PM
Installed the facade, its browseable from a browser so thats not a problem. Have added a mapping for org to load CFCUnit. So what else could be wrong?
Also been getting a lot of view errors, when closing the view and readding the view.
6 Sean Corfield // Apr 25, 2007 at 9:58 PM
It works for me and it works for Matt, once he got the correct URL configured. Catch me on IM and I'll walk you through it with Acrobat Connect if you want...
7 Andrew Scott // Jun 18, 2007 at 11:12 PM
8 Sean Corfield // Jun 18, 2007 at 11:27 PM
Leave a Comment