I'm not quite sure whether this is a bug in JaCoCo or in Coveralls.io, 
because JaCoCo doesn't produce reports of its own anywhere I can find.

I recently refactored some test classes to pull out their common 
functionality into an abstract class, from which they now inherit most of 
their @Test methods. The inherited methods in turn call overridden methods 
to instantiate whichever class is under test. But my reported coverage went 
way down, and went to zero on several classes that I *know* have nonzero 
coverage!

An example is 
at 
https://coveralls.io/builds/13126009/source?filename=src%2Fmain%2Fjava%2Fbetterrandom%2Fprng%2FAesCounterRandom.java.
 
The tests for that class are in these files:


   - 
   
https://github.com/Pr0methean/BetterRandom/blob/de90df9fef137f022d63db4c079057d67af0364f/src/test/java/betterrandom/prng/BaseEntropyCountingRandomTest.java
   - 
   
https://github.com/Pr0methean/BetterRandom/blob/de90df9fef137f022d63db4c079057d67af0364f/src/test/java/betterrandom/prng/BaseRandomTest.java
   - 
   
https://github.com/Pr0methean/BetterRandom/blob/de90df9fef137f022d63db4c079057d67af0364f/src/test/java/betterrandom/prng/AesCounterRandomTest128.java
   - 
   
https://github.com/Pr0methean/BetterRandom/blob/de90df9fef137f022d63db4c079057d67af0364f/src/test/java/betterrandom/prng/AesCounterRandomTest256.java
   
Any way to get accurate coverage when the tests are written this way?

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/73d24b7a-3446-4c2c-bd3f-a9fc64454ba2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to