In this post, we will go over how we can generate Dashboard and HTML reports with the SeleniumBase framework. SeleniumBase has in-built capabilities to generate reports without having to do any additional configuration. Let’s take a look at how we can do that –
Dashboard Report
Dashboard reports can be used to get a high-level overview of all the test runs. You can generate the reports by running the following command –
pytest --dashboard --rs --headless
HTML Report
Along with the Dashboard report, you can also generate detailed HTML report which will provide you with log information if tests failed. The HTML report can also be easily generate by running a single command –
pytest --html=report.html
The HTML report will also attach the screenshot if a test fails which will make debugging your code a lot easier.
Check out the video below to learn more about generating reports using the SeleniumBase framework –
To learn more about Selenium Python, check out the full tutorial series here for free!
I hope this post helped you out, let me know if you have any questions in the comments below!
Happy testing!