"Stop on Error" when running tests

It would be awesome if crystal spec had an optional flag to not continue running the entire test suite on the first failed test.

In phpunit the desired behavior is using both of these flags: --stop-on-error --stop-on-failure.

When actively doing dev work outside of the CI/CD, it is common that a typo or small bug may cause 10 or 100 tests to fail with identical error messages, or if they’re not all the same, you’re only going to fix one at a time anyways, so there is no reason to keep running the full test suite to the end.

This already exists in the form of the --fail-fast flag.

6 Likes