Plugins

Harness Test Coverage Data

Writing automatic tests is a central practice to increase code correctness. Knowing which part of the code is covered by automatic tests helps improving tests and consequently, it helps increasing code correctness.

JArchitect gathers code coverage data from Cobertura. From this data, JArchitect infers some metrics on methods, types, packages and projects : PercentageCoverage, NbLinesOfCodeCovered, NbLinesOfCodeNotCovered and BranchCoverage.

These metrics can be used conjointly with others JArchitect features. For example you can know what code have been added or refactored since the last release and is not thoroughly covered by tests. You can write a CQLinq rule to continuously check that a set of classes is 100% covered. You can list which complex methods need more tests.

Coverage FAQ: