3

We use use junit for unit testing our java code. Today we use cobertura to get coverage numbers. It does not have an easy way of getting per test coverage number. Is there a tool to get per test code coverage - commercial/free?

(cobertura has a patch to get per test coverage numbers, out of date with latest cobertura).

2

3 Answers 3

1

we used clover to good effect. we wrote some ant tasks that allowed us to run it from a dev box, so we could view the coverage numbers locally, and we also integrated it into our continuos integration so we had a site for the official number.

http://www.atlassian.com/software/clover/

the only issue we had was it is a memory hog....

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you all. It would take a while before I try this. I hope accepting the answer is an OK step :)
1

Emma provides detailed reports by overall/package/class for block and line coverage.

Comments

0

The obvious way to do this is, run one test and dump the test coverage data. (In fact, this is the only way to do this).

Our SD Java Test Coverage Tool has explicit DumpVectors and ResetVectors procedures that can be called anytime. By adjusting the unit test framework to just call these two procedures between tests, you can get one test coverage vector per unit test.

The display tool will display any individual test coverage vector. It can also give you the union of the entire set (as if you had run all the tests) or compute how one test overlaps with another.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.