How can we add reporting capabilities to Selenium based UI automated testing, such as reports on failed and passed tests, recurring failed tests, etc.?
2 Answers
I suggest combining Selenium with a test-runner like jUnit or TestNG, then you can parse the results into a nice report with Allure (also lists more test-runners).
The next step is to run all the test on each build, with a build-server like Jenkins and report broken build/tests with visual indicators.
- Allure is a reporting framework to parse xUnit test results, looks pretty nice
- TestNG has reporting, read this blog post to get started: http://learn-automation.com/generate-reports-selenium-using-testng-xslt/
-
1If you are using C# NUnit is also a good source for parsing a test report Oct 6, 2015 at 20:27
This answer is for users who are using PyCharm/want to explore PyCharm.
For Selenium based tests, PyCharm allows you to obtain the test results. If you click the Explore Test Results
option at the Test Runner
tab, of Pycharm, a nice HTML of your tests results open up.
It allows you to take results in following three formats :
- HTML
- XML
- Custom , apply XSL template.
To view results in browser :
Select the Open Exported File
check box
This will automatically open your test results in your default browser.