Saturday, 15 June 2013

java - Cobertura, coverage over multiple jar-files -



java - Cobertura, coverage over multiple jar-files -

is there way cobertura gather test-coverage on several .jar-files. problem have after refactoring of classes covered, beingness in same .jar, no longer beingness reported covered (since in separate .jar).

so, question, ear-project, containing several source-projects (.jar), there way actual coverage ear-project instead of sum of of .jar-coverages.

basically, tests reflects behaviour, not code-structure. since changed structure, behaviour isn't changed. hence tests should not need alter , since tests not changed coverage should not change.

you've 2 options:

1) have cobertura maven plugin in single (parent) pom , set aggregate property true, should overlay cobertura reports on top of each other. see blog post example.

2) if care report, utilize study aggregating tool such sonar not give aggregated reports across project, whole host of metrics , useful info.

java maven tdd code-coverage cobertura

No comments:

Post a Comment