CFUnit is a unit testing framework for ColdFusion, modeled after the popular JUnit framework. CFUnit is an open source project hosted on SourceForge and is freely available. The idea behind unit testing it to build a framework of scripted tests that are frequently executed to verify each method or function behave as expected. Building unit tests are an investment into the stability of your code. It may require a little extra time up front, but will save your and your fellow developers extensive amounts of time and resource down the road. An introductory primer was recently placed online.

3 thoughts

  1. There is also a CFUnit in one of the Macromedia DRKs by Christian Cantrell, which I have not had the opportunity to use, but I have heard positive thing about. And there is another sourceforge project called ColdUnit (but seems to be a bit inactive). So there are a few options for a unit testing framework available.
    I would encourage people to try them all out, and pick which one works best for their needs.

Leave a Reply