Hello, On Friday, December 8, 2017 at 8:14:26 AM UTC+1, [email protected] wrote: > > Im using Powermock to mock some static methods for unit testing and I > found that jacoco on-the-fly coverage analysis is not updated for mock unit > tests. > > Because of that I tried to use jacoco offline analysis.With that I was > able to get the coverage results. > There after I found that when I write new test cases the Jacoco will not > update the coverage. It is still keeping old coverage. >
First of all - what means "will not update the coverage. It is still keeping old coverage"? Which tests did you had, which tests did you add? Which result did you expected? Which result did you get? Clearly snippet of pom.xml is not enough to answer all these question. Please read and study something about how to properly report problems, e.g. https://stackoverflow.com/help/mcve and https://www.chiark.greenend.org.uk/~sgtatham/bugs.html Then note that as specified in documentation ( http://www.jacoco.org/jacoco/trunk/doc/offline.html ) and as shown in various examples : In offline mode ... There are two different ways to provide the > configuration: > Configuration File: ... > System Properties: ... Both are absent in your snippet, so one might assume that it is not configured and hence default location of exec file is not the one that you expect for generation of report ( "${project.build.directory}/jacoco.exe" ). Third - there is configuration option "append" that is "true" by default, which means that subsequent executions will not overwrite exec file but append to it. Hence unless it is explicitly removed, it will be accumulating previous data. Regards. -- 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/38f888f9-17a3-4e2e-9f38-fdb724e745c6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
