开发者

Java App - measure code visited during integration testing

I was wondering is there any tool I can use to instrument my code so that when I perform functional/integration testing, i can get a report of hwat percentage of the code was visited?

We use clover already to test our junit开发者_如何学运维 code coverage but it would be great if we could also test something from the functional perspective


If you already use clover, then you could run your app with the instrumented classes and clover will continue to report out what the coverage is. We've used it to run both unit tests and integration tests, and get the final result at the end.


You can use Cobertura. Once your clases have been instrumented they can log everything while your server/rich client/whatever is running, and on shutdown record everything.

After that, you can run cobertura report which gives you an html page with full coverage.


Or just use IntelliJ. It'll calculate code coverage every time you run your unit tests if you ask it to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜