You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
If you start recording har and then suddenly stop running tests with ctrl + c, this will leave a temporary har file in /tmp.
Expected behaviour
Even though the /tmp folder will be automatically cleared after a system reboot or you can do it manually, is there a way to automatically delete the temporary file on cypress run cancellation?
Thanks for your attention in advance. :)
The text was updated successfully, but these errors were encountered:
@Rikkun-1, to automatically delete the temporary HAR files, you can consider using the disposeOfHar method.
This method is specifically designed to clean up and delete the temporary HAR file. By calling this method on the teardown, you can ensure that the temporary file is removed.
Here's an example of how you can use the disposeOfHar method:
// In your Cypress test filebeforeEach(()=>{// Start recording HAR// ...});afterEach(function(){// Stop running tests// ...// Check if the Cypress run was canceledif(this.currentTest.state==='failed'){// Delete the temporary HAR filecy.disposeOfHar();}});
However, at this moment, there is no way to clean up such files on the unexpected cancellation, as Cypress does not yet support the graceful shutdown. I'm going to convert your report to the feature request if you don't mind.
Description
If you start recording har and then suddenly stop running tests with
ctrl + c
, this will leave a temporary har file in /tmp.Expected behaviour
Even though the /tmp folder will be automatically cleared after a system reboot or you can do it manually, is there a way to automatically delete the temporary file on cypress run cancellation?
Thanks for your attention in advance. :)
The text was updated successfully, but these errors were encountered: