Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top