It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cleaning coverage data from clover

vasya petrov Nov 11, 2012

I need to clear the information on code coverage, I know it can be done by restart server, but this solution does not really fit me, Is it possible to do it differently?

1 answer

1 accepted

0 votes
Answer accepted
Marek Parfianowicz Atlassian Team Nov 11, 2012

Resetting hit counters at runtime is not possible right now.

Marek Parfianowicz Atlassian Team Nov 12, 2012

Do you have any use case where such resetting of hit counters would be useful?

vasya petrov Nov 12, 2012

thank you !

vasya petrov Nov 13, 2012

yep, if i would like to create new report with 0% code coverage, if i want run my tests again

Marek Parfianowicz Atlassian Team Nov 13, 2012

I assume that you'd like to run your tests again, because you have changed something in your application, isn't it? If yes, then it means that application must be rebuilt it and new clover.db has to be copied to the application server. And because of fact that application is re-deployed it means that Clover's coverage recorders will be restarted as well.

James Babka Nov 13, 2012

Marek, does your answer mean that there is no ability to have clover generate historical coverage reports when the code being tested is being changed constantly? After all, whenever we rebuild our code, we generate a new set of clover.db files. Your answer indicates to me that Clover's only historical ability is when you have new/changed tests, not new/changed product code being tested. If that is true, then the historical abilities are completely useless for us (we have at least a dozen change sets going into our build every day).

Marek Parfianowicz Atlassian Team Nov 14, 2012

@jimbabka: I think you've misunderstood my answer.

I wrote that it is not possible to nullify hit counters at runtime (i.e. when an application is running) programatically (like the inline "///CLOVER:FLUSH" directive which allows to flush data to disk).

It is of course possible to restart the application (or server) and start recording again.

Clover historical report is a different feature. It requires history snapshot file, which contains zipped XML coverage report. Historical report compares these XML files (and not clover.db files). So it is of course possible to compare builds between each other - and there's no difference whether application classes or test classes were modified.

Cheers
Marek

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Statuspage

⭐️Would you recommend Statuspage? Leave a (honest!) review. ⭐️

Hi Community friends, We're working on sourcing more reviews on Capterra – a popular software review site –  to help teams like yours make more informed decisions when choosing an inc...

42 views 2 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you