For my project I get a good coverage report by jacoco for the models, but no coverage is shown to the controllers. Is there any configuration option that needs to be applied to jacoco to cover the static methods in the play framework controllers?

This is the command line to launch the automated tests in play with jacoco: $ play-1.2.7/play auto-test PWO -javaagent:../jacoco/lib/jacocoagent.jar

有帮助吗?

解决方案

There are some problems with Jacoco, if you combine it with Mockito or Powermock. Maybe it is your case as well:

As far as I think, Jacoco has no problem with static methods or static initializers.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top