diff --git a/docs/testing/testing-with-django.md b/docs/testing/testing-with-django.md index 0ef6b68c7b..314fdea585 100644 --- a/docs/testing/testing-with-django.md +++ b/docs/testing/testing-with-django.md @@ -44,12 +44,12 @@ URL coverage, and slow tests. Use the `-h` option to discover these features. We also have a `--profile` option to facilitate profiling tests. -Another thing to note is that our tests generally "fail fast," i.e. they -stop at the first sign of trouble. This is generally a good thing for -iterative development, but you can override this behavior with the -`--nonfatal-errors` option. A useful option to combine with that is -the `--rerun` option, which will rerun just the tests that failed in -the last test run. +By default, `test-backend` will run all requested tests, and report +all failures at the end. You can configure it to stop after the first +error with the `--stop` option (or `-x`). + +Another useful option is `--rerun`, which will rerun just the tests +that failed in the last test run. **Webhook integrations**. For performance, `test-backend` with no arguments will not run webhook integration tests (`zerver/webhooks/`), diff --git a/tools/test-backend b/tools/test-backend index 60917224aa..eb6194b060 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -223,10 +223,11 @@ def main() -> None: ) parser.add_argument( - "--nonfatal-errors", - action="store_false", + "-x", + "--stop", + action="store_true", dest="fatal_errors", - help="Continue past test failures to run all tests", + help="Stop running tests after the first failure.", ) parser.add_argument("--coverage", action="store_true", help="Compute test coverage.") parser.add_argument( @@ -257,8 +258,7 @@ def main() -> None: "--rerun", action="store_true", help=( - "Run the tests which failed the last time " - "test-backend was run. Implies --nonfatal-errors." + "Run the tests which failed the last time " "test-backend was run. Implies not --stop." ), ) parser.add_argument( @@ -294,7 +294,7 @@ def main() -> None: # While running --rerun, we read var/last_test_failure.json to get # the list of tests that failed on the last run, and then pretend # those tests were passed explicitly. --rerun implies - # --nonfatal-errors, so that we don't end up removing tests from + # !fatal_errors, so that we don't end up removing tests from # the list that weren't run. if options.rerun: parallel = 1