views:

269

answers:

1

I am trying to be a "good" programmer and have unit tests for my ColdFusion application but haven't been able to find a code coverage tool that can tie into the test that I'm using. For those of you who do unit tests on your ColdFusion code, how have you approached this problem?

A: 

Many have asked, but to date there remains no cold fusion code coverage tool.

The latest Cold Fusion features .NET integration in addition to J2EE integration, so if you require code coverage metrics (ie, customer requirements) then (aside from choosing something other than coldfusion) you might define what parts need such coverage and break them out into .NET or J2EE objects which you can profile with readily available tools.

Alternately, you can do some analysis yourself - use a parser to insert cftrace tags after every control statement and then parse the results.

Lastly, coldfusion does have some basic stack trace ability - I don't know if it goes deeper than that, but it's worth exploring to see what you can parse from that.

I hope this helps!

-Adam Davis

Adam Davis