![Forrest logo](/images/logo.png)
pytest:tldr:18482
The command "pytest --stepwise" is used to run pytest test cases in a stepwise manner.
When running test cases using pytest, all test cases are executed by default. However, in some scenarios, it might be useful to stop execution after each test case, allowing you to interactively inspect the progress of the tests.
The "--stepwise" option enables this behavior. When this option is used, pytest will pause execution after each test case, allowing you to decide whether to continue or stop the test run.
After the completion of each test case, pytest will display a prompt that gives you the following options:
- "s" or "n" to skip the current test case and move to the next one
- "q" to quit the entire test run immediately
- "r" to resume test execution and continue running the remaining test cases
This stepwise execution method allows you to inspect the results and debug any issues after each test case, providing better control and workflow during test execution.