Skip to content

Logging / Reports

Logging, Screenshots, and Reports

Log files in SeleniumBase/examples/example_logs were generated when 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.

pytest --browser=chrome

nosetests --browser=firefox

Examples of expected log files generated during failures:

In addition to logging, you can also generate test reports:

Reports are most useful when running large test suites. Pytest and Nosetest reports are handled differently.

Pytest Reports

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

pytest --html=report.html

Example Pytest Report

Nosetest Reports

The --report option gives you a fancy report after your test suite completes.

nosetests --report --browser=chrome

Example Nosetest Report

(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.)