Extent Reports Introduction – CSharp
In software test automation after completion of the test suite execution we need to have a report for the execution status and it is the only way of evidence for the pass and fail status of the tests. And most of the clients bother about the detailed report of the execution status. Most of the licensed automation testing tools will have in built rich report option to show the execution status.
But coming to open source automation tools lacking in this option. Same way, Selenium also does not have the automation report generation option. But to execute the test suite, selenium is depending on unit testing frameworks like NUnit and MSTest.
After test suite execution using NUnit or MSTest, by default they will NOT give any HTML reports, If you want to generate HTML reports need to depend on other third party tools like NANT. But they will not give rich reports as the information is not that eye catchy.
To overcome these type of issues, we can use Extent Reports. These are very good and rich HTML reports. By using these reports we can provide lot information to the reports. These will also give the status in the form of PIE Chart.
Below are the advantages provided by the Extent Reports:
- Status will be shown in the form of PIE chart.
- Can replace the existing report with the new report or append the new status to the existing report.
- We can change display order of the tests(i.e. oldest test at the top, newest at the end or newest test at the top, oldest at the end)
- Can generate ONLINE or OFFLINE reports.
- Can give the our own name to the test method (i.e can change the test method name in the report).
- Can generate stepwise log information in the report.
- Can segregate the tests using Test Categories.
- Can give test author name to display in the report.
- Can add a test node as a child of another test.
- Can insert any custom HTML in the logs by using an HTML tag.
- Can show the screenshots in the report wherever we need.
- Can add recording of your test runs in the report.
- Can add our own information in the report (i.e. version of selenium used, Environment information where the test suite executed).
- Can give our own name to the HTML report.
- It will give the System information in the report (i.e. HostName and OS used to execute the test suite.)
The above are the advantages provided by the extent reports. We can discuss all these things in the coming blogs.
Extent Report:
You can find the complete information in the below link:
http://extentreports.relevantcodes.com/net/
You can download the Extent Reports DLLs in this link:
http://extentreports.relevantcodes.com/
Apart from the above link, you can directly download using Nuget packages from Visual Studio.
Last but not least, a big thanks to Anshoo Arora for giving this type of reports.
Please watch the YouTube video of this blog for better understanding.