Hi Guys,
I’m having some issues while trying to generate code coverage report for powermockito test case.
I wrote some unit tests for a java project in out system. Since there are some static methods that needed to be mocked, I used powermockito to mock those methods.
However, when I tried to integrate the test with code coverage report generating tool like cobertura along with sonarqube. The test class which was related to powermockito was not being included in the report.
We used to use Jacoco as the report generating tool, the reason that I chose to use cobertura is I saw online that cobertura could be compatible with powermockito perfectly since it can set the phase of instrumenting classes so that instrumentation of powermockito won’t erase the changes made by cobertura.
Has anyone faced similar issue before? Which coverage report generating tool can used to work with powermockito?
The artifact version I used is as below:
Maven: 3.5.0
Cobertura: 2.7
Surefire: 2.1.3
Powermockito: 2.0.2
Will be really appreciated if anyone could help me with the issue.