<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-instrument</id>
<goals>
<goal>instrument</goal>
</goals>
<configuration><includes><include>**/*test*</include></includes></configuration>
</execution>
<execution>
<id>default-restore-instrumented-classes</id>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
<configuration><includes><include>**/*test*</include></includes></configuration>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.basedir}/../target/jacoco.exec</dataFile>
</configuration>
</execution>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
<execution>
<id>Prepare-Jacoco</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration><excludes><exclude>**/*test*</exclude></excludes></configuration>
</execution>
</executions>
<configuration>
<dataFile>${project.basedir}/../target/jacoco.exec</dataFile>
<destFile>${project.basedir}/../target/jacoco.exec</destFile>
<append>true</append>
<propertyName>surefireargs</propertyName>
<!--
For the the fly
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>-->
</configuration>
</plugin>--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powermock+...@googlegroups.com.
To post to this group, send email to powe...@googlegroups.com.
Visit this group at https://groups.google.com/group/powermock.
For more options, visit https://groups.google.com/d/optout.
@RunWith(PowerMockRunner.class)@PrepareForTest({Classtobemocked1.class, Classtobemocked2.class})public class ClassTests { @Test public void test1() { Classtobemocked1 mock = PowerMockito.mock(Classtobemocked1.class); PowerMockito.when(mock.getCount()).thenReturn(10); }}Hello,
Could you provided code example? I can guess what code doesn’t have coverage in report, because code mocked and is not called.
Best regrads,Arthur Zagretdinov