SergeyPirogov / video-recorder-java

This library allows easily record video of your UI tests by just putting couple annotations.
http://automation-remarks.com/video-recorder-java/
MIT License
218 stars 65 forks source link

How can I clean up recordings and running recorder processes from tests that were hard terminated earlier? #59

Open nzall opened 5 years ago

nzall commented 5 years ago

I'm using v1.8. My problem is that while creating new tests, I sometimes have to end the test early when I see that my test has an unrecoverable issue that hasn't yet triggered an automatic fail. I do this through the Terminate button on testNg-Eclipse. When this happens, the recording isn't gracefully ended, which I understand is a limitation of how the Terminate button works.

This means that the next time I start the test, there is still a recording running in the background, and when the next test finishes, it will end all recorder processes, which includes both the process from the new recording AND the old recording. However, because there are 2 recordings, it takes longer to terminate both of them, and this process tends to time out. In 1.8, at least some fix was implemented for this that makes it so the test just fails instead of the entire script crashing, but it's still not perfect.

Ideally, I'd like to cleanup the remnants of previous runs when starting a new run. I already have code that runs once when the first test is started, and I'd like to extend this code with something that at the very least gracefully ends any previous recordings. Is this at all possible?