Testing with EmbeddedKafka - Test report

370 Views Asked by At

I'm using EmbeddedKafka to test the integration with Kafka in my microservice. And also, I'm using jacoco for publishing the test result. Inorder to make the test run without any issue, I have to make the forkCount parameter as 0.

            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.22.1</version>
            <configuration>
                <forkCount>0</forkCount>
                <includes>
                    <include>**/*ITest.java</include>
                </includes>
            </configuration>               
        </plugin>

If not, it fails with error the following error:

MojoFailureException: Error occurred in starting fork, check output in log

The problem is since I'm making the forkCount as 0, the jacoco plugin fails to generate report, as it couldn't start as javaagent. Is there workaround for this?

0

There are 0 best solutions below