Test reporting with Extent Report in Visual Studio


When dealing with tests written using the C# API in VS, you can generate reports using NUnit-Console to execute the tests, and Extent .NET CLI to generate the related reports.

To generate the test reports, perform the following steps:

1) Fill in the test project containing the test cases

2) Run the test project using the following NUnit-Console command
nunit3-console.exe –test=TestSet.Test –inprocess –agents=1 –workers=1 –work= Report\ TestProject\TestSet.dll
where:
–test=NAMES: Comma-separated list of NAMES of tests to run or explore. This option may be repeated.
–inprocess, –agents=1, –workers=1: Settings used to ensure the serial execution of the tests.
–work=PATH: PATH of the directory to use for output files.
For further information click here

3) To generate the test reports using the following Extent .NET CLI command
extent.exe -i Report\TestResult.xml -o HTML-Report
where:
-i: TestRunner results file
-o: Report output directory
For further information click here

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.