Search code examples
c#selenium-webdrivervisual-studio-2015nunitnunittestadapter

How to generate NUnit XML report while running test using VSTS (Unit Test Adapter)


I am automating web application using Selenium WebDriver with C# NUnit Framework and able to generate report in XML format when run test using NUnit GUI or NUnit Console.

I am looking how to generate report while running test using Nunit Test Adapter (Visual Studio 2015 ).

Can any help on same, it would be highly appreciated.

Thanks, Sadik


Solution

  • The code to create an XML formatted output report is in an extension, which is not included in the NUnit adapter. Because, it is after all only an "adapter" I felt that users wouldn't want native NUnit output, but only whatever output Visual Studio provides.

    Another reason it isn't there is that the adapter originally had no way for you to give it any options, so you couldn't actually ask for an XML report! However, the adapter does now read the runsettings file, which could be made to include the equivalent of the console --result option.

    Bottom line, this would be a new feature and you would have to request it. If you do, be sure to use the correct repository: nunit-vs-adapter or nunit3-vs-adapter, depending on whether you use NUnit V2 or V3.