Skip to content

Commit f34c016

Browse files
committed
Update the docs
1 parent 32b3f15 commit f34c016

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,9 @@ self.driver.find_elements_by_partial_link_text("GitHub")
693693
```
694694
(In general, you'll want to use the SeleniumBase versions of methods when available.)
695695

696-
#### Retry Failing Tests Automatically
696+
#### Retrying failing tests automatically
697697

698-
You can use ``--reruns #`` to retry failing tests that many times. Use ``--reruns-delay #`` to wait that many seconds between retries. Example:
698+
You can use ``--reruns NUM`` to retry failing tests that many times. Use ``--reruns-delay SECONDS`` to wait that many seconds between retries. Example:
699699
```
700700
pytest --reruns 5 --reruns-delay 1
701701
```

help_docs/customizing_test_runs.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ In addition to [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/m
88
* Choose additional variables to pass into tests
99
* Change the automation speed (with Demo Mode)
1010
* Choose whether to run tests multi-threaded
11+
* Choose whether to retry failing tests
1112
* Choose a BrowserStack server to run on
1213
* Choose a Sauce Labs server to run on
1314
* Choose a TestingBot server to run on
@@ -34,6 +35,8 @@ nosetests test_suite.py --report --show_report
3435

3536
pytest test_suite.py --headless -n 4
3637

38+
pytest test_suite.py --reruns 1 --reruns-delay 2
39+
3740
pytest test_suite.py --server=IP_ADDRESS --port=4444
3841

3942
pytest test_suite.py --proxy=IP_ADDRESS:PORT
@@ -98,6 +101,13 @@ If you want to pass additional data from the command line to your tests, you can
98101

99102
To run Pytest multithreaded on multiple CPUs at the same time, add ``-n=NUM`` or ``-n NUM`` on the command line, where NUM is the number of CPUs you want to use.
100103

104+
#### **Retrying failing tests automatically:**
105+
106+
You can use ``--reruns NUM`` to retry failing tests that many times. Use ``--reruns-delay SECONDS`` to wait that many seconds between retries. Example:
107+
```
108+
pytest --reruns 5 --reruns-delay 1
109+
```
110+
101111
#### **Debugging tests:**
102112

103113
**You can use the following code snippets in your scripts to help you debug issues:**

0 commit comments

Comments
 (0)