How to save NUnit test results to xml? How to save NUnit test results to xml? selenium selenium

How to save NUnit test results to xml?


So after some research I found the answer. The commands is:

nunit3-console "file.dll"

DLL file can be found in bin\debug\projectname.dll after building the solution (CTRL+SHIFT+B).


Utilizing Test Explorer and the NUnit or NUnit 3 connector, there is no real way to spare the test results as a XML record. You would, as you say, need to introduce the NUnit reassure sprinter and run tests with it. You can utilize the NuGet NUnit.Runners bundle to get a duplicate of NUnit3-support sprinter into your undertaking.


See this answer

NUnit testing can be run with the nunit-console.exe application which is installed with nunit under {Project_root}/lib/nunit/nunit-console.exe. It downloads with NuGet when NUnit installs.

It can be passed a list of testing binaries, or testing project files, or an nunit project (listing multiple if needed).

{PathToProject}\lib\nunit\nunit-console.exe{PathToTestDll}\Project1.Tests.dll{PathToTestDll}\Project2.Tests.dll /xml=nunit-result.xml

or create an NUnit Project with the NUnit Project Editor if you want to group all your test projects into a single config file.

{PathToProject}\lib\nunit\nunit-console.exe{PathToNUnitProject}\Project.Tests.nunit/xml=nunit-result.xml