I am using EclEmma with Eclipse to help me to know where is missing code tests in my project, but all tests with @RunWith(PowerMockRunner.class)
are not called and thus not tested.
I´m using JUnit 4.8.1 with Mockito.
What could it be?
Put your powermock test logic in other simple java class inside test package, and call the merhod from test class, it increase code coverage for your application.
JaCoCo is a free code coverage library for Java, which has been created by the EclEmma team based on the lessons learned from using and integration existing libraries for many years.
JaCoCo Offline Instrumentation works only with PowerMock version 1.6. 6 and above. You may find example of using PowerMock with JaCoCo Offline Instrumentation and Maven in our repository: jacoco-offline example.
Its a known bug reported for both parties:
http://code.google.com/p/powermock/issues/detail?id=402 https://github.com/jacoco/eclemma/issues/15#issuecomment-9565210
eCoberture seems however to provide correct coverage. The only problem, that it seems not to be maintained anymore, and you cannot remove the highlights im Eclipse Juno.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With