Skip to content

Commit 8d5f802

Browse files
committed
Update a ReadMe
1 parent b823848 commit 8d5f802

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

help_docs/customizing_test_runs.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ pytest test_suite.py
220220

221221
<h3><img src="https://seleniumbase.github.io/img/green_logo.png" title="SeleniumBase" width="32" /> Demo Mode:</h3>
222222

223-
If any test is moving too fast for your eyes to see what's going on, you can run it in **Demo Mode** by adding ``--demo`` on the command line, which pauses the browser briefly between actions, highlights page elements being acted on, and lets you know what test assertions are happening in real time:
223+
🔵 If any test is moving too fast for your eyes to see what's going on, you can run it in **Demo Mode** by adding ``--demo`` on the command line, which pauses the browser briefly between actions, highlights page elements being acted on, and lets you know what test assertions are happening in real time:
224224

225225
```bash
226226
pytest my_first_test.py --demo
227227
```
228228

229-
You can override the default wait time by either updating [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) or by using ``--demo-sleep={NUM}`` when using Demo Mode. (NOTE: If you use ``--demo-sleep={NUM}`` without using ``--demo``, nothing will happen.)
229+
🔵 You can override the default wait time by either updating [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) or by using ``--demo-sleep=NUM`` when using Demo Mode. (NOTE: If you use ``--demo-sleep=NUM`` without using ``--demo``, nothing will happen.)
230230

231231
```bash
232232
pytest my_first_test.py --demo --demo-sleep=1.2
@@ -246,31 +246,37 @@ pytest -n 8
246246
pytest -n8
247247
```
248248

249-
<h3><img src="https://seleniumbase.github.io/img/green_logo.png" title="SeleniumBase" width="32" /> Retrying failing tests automatically:</h3>
249+
<h3><img src="https://seleniumbase.github.io/img/green_logo.png" title="SeleniumBase" width="32" /> How to retry failing tests automatically:</h3>
250250

251-
You can use ``--reruns=NUM`` to retry failing tests that many times. Use ``--reruns-delay=SECONDS`` to wait that many seconds between retries. Example:
251+
<p>You can use <code>pytest --reruns=NUM</code> to retry failing tests that many times. Add <code>--reruns-delay=SECONDS</code> to wait that many seconds between retries. Example:</p>
252252

253253
```bash
254254
pytest --reruns=1 --reruns-delay=1
255255
```
256256

257257
<h3><img src="https://seleniumbase.github.io/img/green_logo.png" title="SeleniumBase" width="32" /> Debugging tests:</h3>
258258

259-
You can use the following calls in your scripts to help you debug issues:
259+
🔵 You can use the following calls in your scripts to help you debug issues:
260260

261261
```python
262262
import time; time.sleep(5) # Makes the test wait and do nothing for 5 seconds.
263-
import pdb; pdb.set_trace() # Enter debugging mode. n = next, c = continue, s = step.
264-
import pytest; pytest.set_trace() # Enter debugging mode. n = next, c = continue, s = step.
263+
import pdb; pdb.set_trace() # Debug Mode. n: next, c: continue, s: step, u: up, d: down.
264+
import pytest; pytest.set_trace() # Debug Mode. n: next, c: continue, s: step, u: up, d: down.
265265
```
266266

267-
To pause an active test that throws an exception or error, add ``--pdb -s``:
267+
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
268268

269269
```bash
270-
pytest my_first_test.py --pdb -s
270+
pytest test_fail.py --pdb
271271
```
272272

273-
The code above will leave your browser window open in case there's a failure. (pdb commands: 'c', 's', 'n' => continue, step, next).
273+
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
274+
275+
```bash
276+
pytest test_coffee_cart.py --trace
277+
```
278+
279+
(**``pdb``** commands: ``n``, ``c``, ``s``, ``u``, ``d`` => ``next``, ``continue``, ``step``, ``up``, ``down``).
274280

275281
<h3><img src="https://seleniumbase.github.io/img/green_logo.png" title="SeleniumBase" width="32" /> Combinations of options:</h3>
276282

0 commit comments

Comments
 (0)