Clover liverec file gets deleted each time a clover report is generated. How can I avoid it from being deleted?

I have been testing clover and its powerful and user friedly coverage reports and loving it. I seem to have stumbled upon a roadblock. I have set clover to generate db realtime when the application is up and running. To achieve this I have used flushpolicy="threaded" flushinterval="1000" in clover-setup. I can see the db file size getting increased as I use more and more of my application.

But everytime I generate a clover-report the liverec file gets deleted and any further code coverage is not recorded. Is there any way wherein my generating a report will not impact the recordings?

2 answers

1 accepted

Accepted Answer
0 votes

Hi Somesh,

liverec file gets deleted and any further code coverage is not recorded

Removal of the .liverec file shall not affect a process of recording code coverage in any way. The .liverec file is being used as an indicator that coverage recording process has not finished yet - the clover-report task will delay report generatoion in such case (by default up to 3 seconds).

and preventing it from loosing track of the live code coverage

I suspect that code coverage is still being recorded and written to disk, actually. Removal of .liverec file just caused that report was generated without a 3-second delay and some areas of your application were not covered yet at this time.

Cheers
Marek

Marek

I tried what you suggested with the additional gap of more than 3 seconds upto more than 5 minutes but there was no change in db file size. Which makes me believe that .liverec file is important for the recording process. I recreated the same scenario without deleting the file and there was a constant increase in db size.

Am I missing something here? Why everytime I generate a report in a running build the .liverec gets deleted and my code coverage does not happen any more. Size of the db remains stagnant.

I'd love to investigate it further. Could you please raise an issue at http://support.atlassian.com and attach build files, logs, database and an html report? We will post an answer on this forum as soon as the problem is resolved.

Can anyone help me out here?

I found a workaround though. If I copy all the clover db files into my windows system from my linux box and generate the report on windows, this way I avoid the liverec from getting deleted and preventing it from loosing track of the live code coverage.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

221 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you