I ran into the problem of using the EclEmma plugin in Eclipse. It does not show code coverage when I use annotation @RunWithpassing (PowerMockRunner.class)as argument. In case of use, (MockitoJUnitRunner.class)everything is in order. Waiting for your suggestions? :)
@RunWith
(PowerMockRunner.class)
(MockitoJUnitRunner.class)
This is a known issue with Eclemma (JaCoCo). Basically, both libraries modify the byte code, but Mockito modifies it at run time, which creates another binary .class file. JaCoCo apparently uses tracking classes that it looks through using hashMap, whose hash code is derived from the class definition, so the hashcode will be different after Mockito changes the class, so JaCoco will no longer be able to find the class in it on internal Maps .
It was discussed in more detail:
Why doesn't EclEmma populate code with tests using @RunWith (PowerMockRunner.class)
Coverage Emma code with JUnit and Powermock
http://code.google.com/p/powermock/issues/detail?id=402
Per , EclEmma ( ) PowerMock Mockito JAR Eclipse (3.7) .
.
Powermock Eclemma 1.5.3; Eclemma 3.0.0!
Eclipse - Kepler 2 JUnit4 PowerMockito2 - 1.7.0. Eclemma 1.5.3
, % junit.
!!!
EclEmma - , PowerMock .
, PowerMock,
http://www.notonlyanecmplace.com/make-eclemma-test-coverage-work-with-powermock/