Pregunta

I am using jmockit to test out a class which has some complex dependecies. I have marked this class as @Mocked in the test. The test runs fine. I generate a jacoco html report from the output. I do not see any coverage for the "Mocked" class under test.

Am I not seeing coverage becuase the class is 'Mocked' (partially)?

¿Fue útil?

Solución

jacoco does not give coverage for jmockit mocked objects (even "partially"). I created the test with the object under Test as "Tested" (instead of "Mocked") and it solved the problem.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top