Our Blog

 

The more ColdFusion unit tests I needed to run, the more I wanted to have a nice interface where I could only see errors or failing tests, and that it would allow me to selectively run tests. That is why I created cfcUnit Runner, a Flex application to run cfcUnit tests. I believe it could also used to run CFUnit tests, but CFUnit will need to implement a service façade that Flex can use.  You can read more in the project's page and use the forums and bug tracker of RiaForge. I have a live demo where you can see it running and I also made a short movie that shows all the features.

Live application (Flash Player 9 required). View source on right click enabled

Recorded demo

Download Application

Source (Flex 2)

Laura

Laura

13 Comments

  1. Robert Blackburn
    That is great Laura.

    Unfortunately it totally stole my thunder :o)
    I've been working on something just like this for CFUnit (A flex based runner). What little I have so far is in SVN:
    http://cfunit.svn.sourceforge.net/viewvc/cfunit/trunk/src/net/sourceforge/cfunitReport/

    This is intended to be both a runner and a way to review the history logs of CFUnit (and of course re-execute any of the tests). Any suggestions would be welcome.

    I would certainly be willing to help put together a CFUnit service façade which your runner could consume too – feel free to shoot me an email with the details if you are interested ([email protected]).
  2. Laura
    Robert,
    I think I would be great if we can make it work with CFUnit as well. Since cfcUnit already implemented the service facade, I would use their same bean classes for the returned results, otherwise, I would have to make some changes. But I am open to ideas on how to integrate it.

    Do you have the compiled swf of what you've done somewhere to see?
  3. Edd
    any test example scripts other that the ones that come with crcUnit?

    thanks
  4. Laura
    Edd,
    It doesn't come with any other tests, but it should be simple to add a few. I'll see if I can write a couple to add to the download.
  5. David Brannan
    Does this have to be placed in the same directory as your CFCs or is there a configuration file that allows you to point it to a directory of your choosing?

    Very useful utility BTW. I'm hoping to use this in converting my app to Flex.
  6. Dave Spurr
    I'm sorry if this is a silly question but I can't seem to get it to work. I have mappings setup for both /org and /cfcunit but whenever I try to run a test I get a failed HTTP connection message.
  7. Laura
    Dave,
    The easiest way to make it work is by having org and cfcunit in the root of your site. Alternatively, you can modify the file [cfroot]\web-inf\flex\services-config.xml and change the use-mappings value to true:

    <use-mappings>true</use-mappings>
  8. Robert Blackburn
    Hi Laura,
    Sorry for the delayed reply, it’s a busy time of year :o)

    No there is no demo site set up right now. CFUnit's site is housed on sourceforge.net which unfortunately runs on PHP. It is not really functioning yet anyhow. At this point I have more ideas then code :o)

    I have taken a look at the source to see what you would need to get cfcUnitRunner integrated with CFUnit. I hope you don't mind if I e-mail some information and questions?

    Thanks
  9. Chaz
    Hi Laura,

    I have a question about the live demo. What software you use to create that?

    Thanks
  10. Chaz
    I am sorry, its the short movie my question is about. What software was use to create this?

    Thanks
    Chaz
  11. Laura
    Chaz,
    I used Wink (http://www.debugmode.com/wink/) to make the video.
  12. Bram
    Laura,

    How could I test if my cfc method returns a
    valid query ? I got everything running, but
    even after going through the docs, I'm still
    confused how to do just that.

    Could you give an example ?