cool-easter-32542
03/31/2023, 5:00 PMtest goal had an option to do more than one run per test. For comparison, in Bazel, the bazel test command allows one to specify --cache_test_results=no --runs_per_test=<n> in order to accomplish this. I haven't found an equivalent option in Pants though.
Describe the solution you'd like
I would like an option similar to --runs_per_test to be available as part of the Pants test goal so that one can request multiple runs per test.
Describe alternatives you've considered
I've considered the pytest-repeat plugin for Pytest (https://pypi.org/project/pytest-repeat/). However, according to the project description page, the plugin does not support unittest.TestCase test classes.
Additional context
The context is that one may want to do multiple runs per test in order to more readily expose flaky unit tests. I want to do periodic runs in CI where all unit tests are reran forcefully (i.e., with the --force option). I would also like to do more than run per test. I don't know of a supported method to do multiple runs per test directly through Pants though.
pantsbuild/pantscool-easter-32542
04/01/2023, 4:44 PM