Cypress run doesn't terminate app instance after all tests finishes #27474
Replies: 3 comments 3 replies
-
By default, Cypress keeps the application instance running after the test suite has finished executing to allow for easier debugging and inspection. This can be helpful for diagnosing issues, but it might also result in unwanted behavior, like holding up system resources or affecting subsequent test runs. If you want to ensure that the application instance is terminated after Cypress finishes testing, you have a couple of options:
Remember that the exact implementation of terminating or closing the application instance depends on your specific setup and technology stack. It could involve shutting down the server, stopping Docker containers, or any other necessary steps to fully terminate the application. Be sure to adjust the code in the custom command or task according to your application's requirements. |
Beta Was this translation helpful? Give feedback.
-
Hey @DevJSter $NYC_CMD $NPX $EXEC $CMD $CYPRESS_CFG --browser $BROWSER --env updateSnapshots=true,SNAPSHOTS_DIR=$SNAPSHOTS_DIR,E2E=true,E2E_RECORD=$E2E_RECORD & test_pid=$! // Wait until test runner is done sometimes cypress fails to exit and keeps the runner in the background(wait $test_pid keeps waiting forever and kill-port command never gets executed) Not sure how to debug the problem and fix |
Beta Was this translation helpful? Give feedback.
-
Dealing with a situation where your bash script hangs can be quite frustrating, but we can work through this step by step. Here are some suggestions to help you figure out and fix the problem:
Remember, troubleshooting can take time, and it's okay to experiment and try different things to get to the bottom of the issue. |
Beta Was this translation helpful? Give feedback.
-
How can I terminate app instance after cypress finish testing? it looks like the default is to keep app instance for further debugging
Beta Was this translation helpful? Give feedback.
All reactions