Logging, Screenshots, and Reports examples
Log files in example_logs/ were generated when test_fail.py ran and failed. By default, logs are saved to
latest_logs/. If ARCHIVE_EXISTING_LOGS is set to True in settings.py, past logs get saved to
pytest test_fail.py --browser=chrome nosetests test_fail.py --browser=firefox
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.
--html=report.html gives you a fancy report of the name specified after your test suite completes.
pytest test_suite.py --html=report.html
--report option gives you a fancy report after your test suite completes. (Requires
--with-testing_base to also be set when
--report is used because it's part of that plugin.)
nosetests test_suite.py --report --browser=chrome
(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.)