Search code examples
powermockemmaeclemma

Eclemma 1.5.3 coverage report in exception scenarios


We are using eclemma-1.5.3 to get our unit test coverage report. For the unit test we have used powermock-easymock-1.5.5. Our problem is when we run the test for some exception scenarios in test class that exception method(we wrote in test class) showing in red color. Because of this reason our total coverage going down. But our actual test method exception scenario is running as expected.

please give some suggestion to fix this issue.


Solution

  • EclEmma cannot see coverage from PowerMock-based tests. That won't be fixed. Assuming your coverage data is being generated by your command-line module build (using Cobertura or JaCoCo), when you want to see this information, you'll have to run the command-line build and inspect the coverage report from the build.