@@ -10,88 +10,88 @@ During test failures, logs and screenshots from the most recent test run will ge
10
10
11
11
** Here are some example run commands to help get you started:**
12
12
13
- * Run an example test in Chrome: (Default: `` --browser=chrome `` )
13
+ Run an example test in Chrome: (Default: `` --browser=chrome `` )
14
14
``` bash
15
15
pytest my_first_test.py
16
16
```
17
17
18
- * Run an example test in Firefox:
18
+ Run an example test in Firefox:
19
19
``` bash
20
20
pytest my_first_test.py --browser=firefox
21
21
```
22
22
23
- * Run an example test in Demo Mode: (highlight assertions)
23
+ Run an example test in Demo Mode: (highlight assertions)
24
24
``` bash
25
25
pytest my_first_test.py --demo
26
26
```
27
27
<img src =" https://cdn2.hubspot.net/hubfs/100006/images/my_first_test_gif.gif " title =" SeleniumBase " ><br />
28
28
29
- * Run an example test in Headless Mode: (invisible browser)
29
+ Run an example test in Headless Mode: (invisible browser)
30
30
``` bash
31
31
pytest my_first_test.py --headless
32
32
```
33
33
34
- * Run tests with verbose output: (includes more details)
34
+ Run tests with verbose output: (includes more details)
35
35
``` bash
36
36
pytest test_suite.py -v
37
37
```
38
38
39
- * Run tests multi-threaded using [ n] threads:
39
+ Run tests multi-threaded using [ n] threads:
40
40
``` bash
41
41
pytest test_suite.py -v -n=4
42
42
```
43
43
44
- * Run a parameterized test: (Generates multiple tests from one)
44
+ Run a parameterized test: (Generates multiple tests from one)
45
45
``` bash
46
46
pytest parameterized_test.py -v
47
47
```
48
48
49
- * Run a test suite and generate a pytest report: (pytest-only)
49
+ Run a test suite and generate a pytest report: (pytest-only)
50
50
``` bash
51
51
pytest test_suite.py -v --html=report.html
52
52
```
53
53
54
- * Run a failing test: (See the `` latest_logs/ `` folder for logs and screenshots)
54
+ Run a failing test: (See the `` latest_logs/ `` folder for logs and screenshots)
55
55
``` bash
56
56
pytest test_fail.py
57
57
```
58
58
59
- * Run an example test using Chrome's mobile device emulator: (default settings)
59
+ Run an example test using Chrome's mobile device emulator: (default settings)
60
60
``` bash
61
61
pytest test_swag_labs.py --mobile
62
62
```
63
63
64
- * Run a failing test with Debug-mode enabled: (`` pdb `` activates on failures)
64
+ Run a failing test with Debug-mode enabled: (`` pdb `` activates on failures)
65
65
``` bash
66
66
pytest test_fail.py --pdb -s
67
67
```
68
68
69
- * Run an example test suite that demonstrates the use of pytest markers:
69
+ Run an example test suite that demonstrates the use of pytest markers:
70
70
``` bash
71
71
pytest -m marker_test_suite -v
72
72
```
73
73
74
- * Run an example test suite that reuses the browser session between tests:
74
+ Run an example test suite that reuses the browser session between tests:
75
75
``` bash
76
76
pytest test_suite.py --reuse-session -v
77
77
```
78
78
79
- * Run an example test demonstrating the `` rate_limited `` Python decorator:
79
+ Run an example test demonstrating the `` rate_limited `` Python decorator:
80
80
``` bash
81
81
pytest rate_limiting_test.py
82
82
```
83
83
84
- * Run an example test that demonstrates how to upload a file to a website:
84
+ Run an example test that demonstrates how to upload a file to a website:
85
85
``` bash
86
86
pytest upload_file_test.py
87
87
```
88
88
89
- * Run an example test suite and generate a nosetest report: (nosetests-only)
89
+ Run an example test suite and generate a nosetest report: (nosetests-only)
90
90
``` bash
91
91
nosetests test_suite.py --report --show-report
92
92
```
93
93
94
- * Run an example test using a nosetest configuration file: (nosetests-only)
94
+ Run an example test using a nosetest configuration file: (nosetests-only)
95
95
``` bash
96
96
nosetests my_first_test.py --config=example_config.cfg
97
97
```
0 commit comments