Run only failed (spock) tests

We have a few hundred spock end-to-end tests for a highly asynchronous system (which includes third-party software we can not modify). Sometimes 1-3 (always different) of these tests fail. It is there a way to rerun these test only?

Gradle doesn’t currently have a feature to only run previously failed tests. You should be able to implement it on your own, though. For example, you could implement a (Gradle) test listener that writes failed tests to a file, and use that to configure test includes.