Can I find code coverage in ColdFusion?

I try to be a “good” programmer and have unit tests for my ColdFusion application, but I could not find a code coverage tool that could bind to the test I am using. For those of you who are doing unit tests of your ColdFusion code, how did you apply this problem?

+6
coldfusion unit-testing
source share
2 answers

Many have asked , but there is still no toolkit to cover ColdFusion code.

The latest version of ColdFusion implements .NET integration in addition to J2EE integration, so if you need code coverage metrics (that is, customer requirements), then (in addition to choosing something other than ColdFusion) you can determine which parts need this reach and break them down into .NET or J2EE objects that you can profile using the available tools.

Alternatively, you can do the analysis yourself - use a parser to add cftrace tags after each control, and then analyze the results.

Finally, ColdFusion has some basic stack trace - I don't know if it goes deeper, but it's worth exploring to see what you can analyze from this.

Hope this helps!

Adam Davis

0
source share

With ColdFusion Builder, you can use Rancho to cover the code.

http://forta.com/blog/index.cfm/2012/5/25/ColdFusion-Code-Coverage-With-Rancho

+1
source share

All Articles