TDD, BDD & Coldbox

Hey gang,

I've search high and low and found a little bit of information here
and there, but nothing definitive and nothing that encapsulates all
the testing I want to do, so let me explain where I come from, what
I'm trying to do and hear what you guys recommend.

I've been in Coldfusion since 2001 (vs. 4.5) but didn't get into MVC
frameworks until I started working in Ruby on Rails almost 2 yrs ago.
In that time, I became a HUGE fan of some of the TDD, BDD conventions
as well as the gems that make that easier (Rspec, Cucumber, Shoulda,
Capybara, etc).

Then I started working with a company that is using Railo and Coldbox
and so far, I'm loving what the community (and Luis) have come up with
for a solid approach to OO dev and an MVC framework for Coldfusion.

Now I need to look at implementing a testing process and I'd like to
bring some of the things I learned elsewhere to this project I'm
working on but I'm not sure what tools are available to me and what is
included and how to use it as well as the best way to move forward and
most importantly, WHY is it the best way.

So please input the following if you will...

1. What tools/code/frameworks are there for Unit, Functional, View and
Integration tests?
2. What tools work best with Railo 3 and Coldbox 3...and WHY?
3. Do I need to install said tools or are they included in Railo or
4. What procedures do you use when implementing testing and adding new
processes to your coding routines, etc.

Any additional information would be greatly helpful as I formulate a
good action plan for a project I want to see become solid and think
testing will help get us there.


For TDD mxUnit is the best, and very easy to get up and running and is supported with ColdBox.

BDD is not a big thing when it comes to ColdFusion in general, which is a shame as it is so much better than TDD.

I use MXUnit to provide the testing functionality. It integrates into Eclipse, can be executed from the Web and also easily integrates with ANT. I use MockBox to support mocking within my tests. I use Jenkins to automate testing based on commits to our version control systems.

Good information. Keep it coming.

Thanks so much

MXUnit is the defacto standard for unit testing. For BDD, I played
around with cfspec and it was a decent start but very young. Doesn't
look like it has been updated in quite awhile but it is still
available on riaforge. Sean Corfield did a presentation on BDD with

As far as integration testing and automation goes, I use Selenium.
There is a CF wrapper for Selenium now but I haven't used it yet. The
project seems to be pretty active though.

All the above tools work fine with Railo as far as I'm aware.


Yeah I think the author of cfspec must have moved on, it showed some serious potential.

MXUnit is the framework you will need to do several types of testing in your apps. ColdBox supports the following:

  • Mocking and Stubbing via MockBox
  • Unit tests in conjunction with MXUnit via our BaseModelTest
  • Integration testing in conjunction with MXUnit via our BaseTestCase
  • Plugin testing in conjunction with MXUnit via our BasePluginTest
  • Isolated Handler testing in conjunction with MXUnit via our BaseHandlerTest
  • Isolated Interceptors testing in conjunction with MXUnit via our BaseInterceptorTest

You can then mix these tests via ANT + MXUnit ANT tasks to automate them and then use something like Jenkins to automate even further.

As for BDD, I have not delved in that are, but would love to learn more about it and see if MockBox could be extended to support it.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager: