开发者

How to test the code coverage of a java web application in netbeans?

I have a java web application and I use Netbeans6.9.1 to develop it.

I wrote some Junit test class of some DAO classes, but I failed to ru开发者_如何转开发n code coverage test.

It seems NetBeans Code Coverage Plugin does not support java web application code coverage,

and I can not activate coverage collection as the Tutorial.

Any ideas?


If you're writing unit tests of DAOs, none of the code will run on the app server yet (since the DAOs should be instantiated in the same JVM as the test class), so you should be able to do code coverage. What exact errors are you getting?


Cobertura is a good code coverage tool, and there's a plugin for NetBeans, too.


I can confirm that the Codecoverage plug-in works in Netbeans 7.2. However in web projects the Coverage menu option is NOT active :-(

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜