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?
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.
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.
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.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Heya, Hipchat friends! We’re so happy you’re checking out Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...
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!
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