Start your demo and save on the first 12 months!


Test reporting with Extent Report in Visual Studio

Posted by on 21 September 2021 in Blog, Tips

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
–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
-i: TestRunner results file
-o: Report output directory
For further information click here