You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2><imgsrc="https://seleniumbase.io/img/logo3a.png"title="SeleniumBase"width="32" /> Running Example Tests:</h2>
4
4
5
-
SeleniumBase tests are run with <b>pytest</b>. Chrome is the default browser if not specifed. During test failures, logs and screenshots from the latest run are saved to the ``latest_logs/`` folder.
<b>SeleniumBase</b> tests are run with <b>pytest</b>. Chrome is the default browser if not specifed. During test failures, logs and screenshots from the latest run are saved to the ``latest_logs/`` folder.
6
8
7
9
* Example tests are located in <b>[SeleniumBase/examples](https://github.com/seleniumbase/SeleniumBase/tree/master/examples)</b>.
8
10
@@ -11,90 +13,111 @@ SeleniumBase tests are run with <b>pytest</b>. Chrome is the default browser if
11
13
**Here are some example run commands to help get you started:**
12
14
13
15
Run an example test in Chrome: (Default: ``--browser=chrome``)
16
+
14
17
```bash
15
18
pytest my_first_test.py
16
19
```
17
20
18
21
Run an example test in Firefox:
22
+
19
23
```bash
20
24
pytest my_first_test.py --browser=firefox
21
25
```
22
26
23
27
Run an example test in Demo Mode: (highlight assertions)
Copy file name to clipboardExpand all lines: help_docs/customizing_test_runs.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,26 +170,31 @@ SeleniumBase lets you run tests on remote Selenium Grids such as [BrowserStack](
170
170
(For setting browser desired capabilities while running Selenium remotely, see the ReadMe located here: https://github.com/seleniumbase/SeleniumBase/tree/master/examples/capabilities)
171
171
172
172
Here's how to connect to a BrowserStack Selenium Grid server for running tests:
You can use ``--reruns=NUM`` to retry failing tests that many times. Use ``--reruns-delay=SECONDS`` to wait that many seconds between retries. Example:
237
+
232
238
```
233
239
pytest --reruns=2 --reruns-delay=1
234
240
```
@@ -258,7 +264,8 @@ Using ``--html=report.html`` gives you a fancy report of the name specified afte
(NOTE: You can add ``--show_report`` to immediately display Nosetest reports after the test suite completes. Only use ``--show_report`` when running tests locally because it pauses the test run.)
0 commit comments