Domanda

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)?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top