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
(NOTE: Some example tests fail on purpose to demonstrate [logging features](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md).)
14
14
15
-
<h3><imgsrc="https://seleniumbase.io/img/logo3a.png"title="SeleniumBase"width="32" /> Example run commands to help you get started:</h3>
15
+
<h3><imgsrc="https://seleniumbase.io/img/logo6.png"title="SeleniumBase"width="32" /> Example run commands to help you get started:</h3>
16
16
17
17
Run an example test in Chrome: (Default: ``--browser=chrome``)
### <imgsrc="https://seleniumbase.io/img/sb_icon.png"title="SeleniumBase"width="30" /> Logging, Screenshots, and Reports:
3
+
<h3><imgsrc="https://seleniumbase.io/img/logo6.png"title="SeleniumBase"width="32" /> Logging, Dashboards, and Reports:</h3>
4
4
5
-
Log files in [SeleniumBase/examples/example_logs](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/example_logs) were generated when [test_fail.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_fail.py) ran and failed. During test failures, logs and screenshots get saved to the ``latest_logs/`` folder. If ``--archive-logs`` is set, test logs will get archived to the ``archived_logs/`` folder.
5
+
Log files in [SeleniumBase/examples/example_logs](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/example_logs) were generated when [test_fail.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_fail.py) ran and failed. During test failures, logs and screenshots from the latest run will get saved to the ``latest_logs/`` folder. If ``--archive-logs`` is set, test logs will get archived to the ``archived_logs/`` folder (otherwise they will be cleaned out when the next test run begins).
<b>In addition to log files, you can also generate a dashboard and test reports.</b>
21
+
20
22
--------
21
23
22
-
<b>In addition to logging, you can also generate test reports:</b>
24
+
<h3><imgsrc="https://seleniumbase.io/img/logo6.png"title="SeleniumBase"width="32" /> The SeleniumBase Dashboard:</h3>
25
+
26
+
The ``--dashboard`` option for pytest generates a SeleniumBase Dashboard located at ``dashboard.html``, which updates automatically as tests run and produce results.
Additionally, you can host your own SeleniumBase Dashboard Server on a port of your choice. Here's an example of that using Python 3's ``http.server``:
31
+
32
+
```bash
33
+
python -m http.server 1948
34
+
```
35
+
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.)
23
37
24
-
Reports are most useful when running large test suites. Pytest and Nosetest reports are handled differently.
38
+
Here's a full example of what the SeleniumBase Dashboard may look like:
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/).
(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