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?
To calculate the code coverage percentage, simply use the following formula: Code Coverage Percentage = (Number of lines of code executed by a testing algorithm/Total number of lines of code in a system component) * 100.
Open the source code and view its code coverage results in the editor. In the Workbench code coverage report either double-click on the compilation unit, such as a source file or function, or right-click the compilation unit and click Open in Editor.
Code coverage enforcementlink To enable this, open the Karma test platform configuration file, karma. conf. js , and add the check property in the coverageReporter: key. The check property causes the tool to enforce a minimum of 80% code coverage when the unit tests are run in the project.
With ColdFusion Builder you can use Rancho for code coverage.
http://forta.com/blog/index.cfm/2012/5/25/ColdFusion-Code-Coverage-With-Rancho
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With