Skip to content

Commit bc4e453

Browse files
committed
Update the docs
1 parent 9555b29 commit bc4e453

File tree

3 files changed

+43
-9
lines changed

3 files changed

+43
-9
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ pytest test_demo_site.py
457457
```
458458
459459
460-
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Logging / Results from Failing Tests:</h3>
460+
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Log files from failed tests:</h3>
461461
462462
Let's try an example of a test that fails:
463463
@@ -484,7 +484,11 @@ You'll notice that a logs folder, "latest_logs", was created to hold information
484484
485485
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> The SeleniumBase Dashboard:</h3>
486486
487-
The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results.
487+
The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results. Example:
488+
489+
```bash
490+
pytest --dashboard --rs --headless
491+
```
488492
489493
<img src="https://seleniumbase.io/cdn/img/dashboard_1.png" alt="The SeleniumBase Dashboard" title="The SeleniumBase Dashboard" width="360" />
490494
@@ -494,7 +498,7 @@ Additionally, you can host your own SeleniumBase Dashboard Server on a port of y
494498
python -m http.server 1948
495499
```
496500
497-
Now you can navigate to ``http://localhost:1948/dashboard.html`` in order to view the served dashboard from a web browser. (Be sure to run that command in the same directory where you ran your tests.)
501+
Now you can navigate to ``http://localhost:1948/dashboard.html`` in order to view the dashboard as a web app. This requires two different terminal windows: one for running the server, and another for running the tests, which should be run from the same directory.
498502
499503
Here's a full example of what the SeleniumBase Dashboard may look like:
500504
@@ -507,7 +511,7 @@ pytest test_suite.py --dashboard --rs --headless
507511
--------
508512
509513
<a id="creating_visual_reports"></a>
510-
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Creating Visual Test Suite Reports:</h3>
514+
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Creating Visual Test Reports:</h3>
511515
512516
<h4><b>Pytest Reports:</b></h4>
513517
@@ -519,6 +523,10 @@ pytest test_suite.py --html=report.html
519523
520524
<img src="https://seleniumbase.io/cdn/img/html_report.png" alt="Example Pytest Report" title="Example Pytest Report" width="520" />
521525
526+
When combining pytest html reports with SeleniumBase Dashboard usage, the pie chart from the Dashboard will get added to the html report. Additionally, if you set the html report URL to be the same as the Dashboard URL when also using the dashboard, (example: ``--dashboard --html=dashboard.html``), then the Dashboard will become an advanced html report when all the tests complete.
527+
528+
If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may need to [configure Jenkins settings](https://stackoverflow.com/a/46197356) for the html to render correctly. This is due to [Jenkins CSP changes](https://www.jenkins.io/doc/book/system-administration/security/configuring-content-security-policy/).
529+
522530
You can also use ``--junit-xml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests.
523531
524532
```bash

examples/example_logs/ReadMe.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ nosetests test_fail.py --browser=firefox
2323

2424
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> The SeleniumBase Dashboard:</h3>
2525

26-
The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results.
26+
The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results. Example:
27+
28+
```bash
29+
pytest --dashboard --rs --headless
30+
```
2731

2832
<img src="https://seleniumbase.io/cdn/img/dashboard_1.png" alt="The SeleniumBase Dashboard" title="The SeleniumBase Dashboard" width="360" />
2933

@@ -33,7 +37,7 @@ Additionally, you can host your own SeleniumBase Dashboard Server on a port of y
3337
python -m http.server 1948
3438
```
3539

36-
Now you can navigate to ``http://localhost:1948/dashboard.html`` in order to view the served dashboard from a web browser. (Be sure to run that command in the same directory where you ran your tests.)
40+
Now you can navigate to ``http://localhost:1948/dashboard.html`` in order to view the dashboard as a web app. This requires two different terminal windows: one for running the server, and another for running the tests, which should be run from the same directory.
3741

3842
Here's a full example of what the SeleniumBase Dashboard may look like:
3943

@@ -55,8 +59,16 @@ pytest test_suite.py --html=report.html
5559

5660
<img src="https://seleniumbase.io/cdn/img/html_report.png" alt="Example Pytest Report" title="Example Pytest Report" width="520" />
5761

62+
When combining pytest html reports with SeleniumBase Dashboard usage, the pie chart from the Dashboard will get added to the html report. Additionally, if you set the html report URL to be the same as the Dashboard URL when also using the dashboard, (example: ``--dashboard --html=dashboard.html``), then the Dashboard will become an advanced html report when all the tests complete.
63+
5864
If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may need to [configure Jenkins settings](https://stackoverflow.com/a/46197356) for the html to render correctly. This is due to [Jenkins CSP changes](https://www.jenkins.io/doc/book/system-administration/security/configuring-content-security-policy/).
5965

66+
You can also use ``--junit-xml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests.
67+
68+
```bash
69+
pytest test_suite.py --junit-xml=report.xml
70+
```
71+
6072
--------
6173

6274
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Nosetest Reports:</h3>

help_docs/customizing_test_runs.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ The code above will leave your browser window open in case there's a failure. (i
260260

261261
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> The SeleniumBase Dashboard:</h3>
262262

263-
The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results.
263+
The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results. Example:
264+
265+
```bash
266+
pytest --dashboard --rs --headless
267+
```
264268

265269
<img src="https://seleniumbase.io/cdn/img/dashboard_1.png" alt="The SeleniumBase Dashboard" title="The SeleniumBase Dashboard" width="360" />
266270

@@ -270,7 +274,7 @@ Additionally, you can host your own SeleniumBase Dashboard Server on a port of y
270274
python -m http.server 1948
271275
```
272276

273-
Now you can navigate to ``http://localhost:1948/dashboard.html`` in order to view the served dashboard from a web browser. (Be sure to run that command in the same directory where you ran your tests.)
277+
Now you can navigate to ``http://localhost:1948/dashboard.html`` in order to view the dashboard as a web app. This requires two different terminal windows: one for running the server, and another for running the tests, which should be run from the same directory.
274278

275279
Here's a full example of what the SeleniumBase Dashboard may look like:
276280

@@ -282,7 +286,7 @@ pytest test_suite.py --dashboard --rs --headless
282286

283287
--------
284288

285-
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="28" /> Pytest Reports:</h3>
289+
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Pytest Reports:</h3>
286290

287291
Using ``--html=report.html`` gives you a fancy report of the name specified after your test suite completes.
288292

@@ -292,6 +296,16 @@ pytest test_suite.py --html=report.html
292296

293297
<img src="https://seleniumbase.io/cdn/img/html_report.png" alt="Example Pytest Report" title="Example Pytest Report" width="520" />
294298

299+
When combining pytest html reports with SeleniumBase Dashboard usage, the pie chart from the Dashboard will get added to the html report. Additionally, if you set the html report URL to be the same as the Dashboard URL when also using the dashboard, (example: ``--dashboard --html=dashboard.html``), then the Dashboard will become an advanced html report when all the tests complete.
300+
301+
If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may need to [configure Jenkins settings](https://stackoverflow.com/a/46197356) for the html to render correctly. This is due to [Jenkins CSP changes](https://www.jenkins.io/doc/book/system-administration/security/configuring-content-security-policy/).
302+
303+
You can also use ``--junit-xml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests.
304+
305+
```bash
306+
pytest test_suite.py --junit-xml=report.xml
307+
```
308+
295309
--------
296310

297311
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="28" /> Nosetest Reports:</h3>

0 commit comments

Comments
 (0)