I am running Jacoco as a java agent to run my automatic testing on a very huge project which takes more than 1 day to complete and sometimes my main program doesn't shut down properly which results in a .exec file of very less size or even corrupted one.
So, 1 whole day of testing is wasted since I can't use the .exec to generated report.
Is there a way where the .exec is continuously getting dumped, I don't want to use tcpserver/client thing here because everything is on same machine.
Either I can expose my agent via JMX and write a program which calls the Agent.dump(true) every minute or I can have a thread in Agent class which will call dump(true) every minute until shutdown.
Do you think any of these options will serve my requirement?
I ran my application where I manually invoked the dump method many times from JMX while it was executing which resulted in little increase of .exec file. Again I ran the application without any manual dumps, it generated the .exec file of size little lesser than the formal one but there HTML report is almost the same. My application takes 5 minutes to execute completely.
Suppose, my application runs for 2-3 day and its shutdown was not proper or was accidentally killed by something/someone then the .exec file which I'll get will be very small or corrupted but if I take the dump every minute then I will lose the execution data of maximum 1 minute that too in the worst case?
Please correct me if I am wrong?
Thanks,
Shubham
Thanks, Marc for your reply.
I can only use the second file if I take the approach of running a thread inside Agent class where I can have a second variable like destfile_backup and dump it in there.
But if automate via JMX style it will still use the destfile only.
Thanks, Marc for your reply.
I can only use the second file if I take the approach of running a thread inside Agent class where I can have a second variable like destfile_backup and dump it in there.
But if automate via JMX style it will still use the destfile only.