Run Cancellation API
Evaluating
The Run Completion API allows you to signal to Cypress Cloud that an active test run is safe to complete when all in-progress or queued spec files have finished processing. It supports flexibility and control of the run's timing when the run is in a good state.
Run cancellation, on the other hand, is a way to interrupt an active Cypress run that has unfinished specs or tests. This can if you cancel your build process in the middle of a run. Cypress Cloud has a built-in, configurable Run Timeout that needs to expire before the run resolves to a finalized "cancelled" state. The timeout is in place so that quiet, long-running specs don't lead to a run cancelling early from the Cypress Cloud side. If you have deliberately cancelled your CI build, then your processes that were running Cypress have already stopped, so Cypress Cloud doesn't need to wait. The Run Cancellation API allows you to programmatically cancel a run so that it moves to the final state immediately. This can be useful if you are automating re-runs of failed tests or specs in CI (see Re-run Optimization) or want to trigger post-run side-effects like Webhooks, without waiting for the configured Run Timeout to expire.