0

I'm trying to use NUnit-Gui with OpenCover. To do it I'm starting the OpenCover with NUnit-Gui as main process, with the command as follow:

C:\OpenCover\OpenCover.Console.exe -target:"C:\Nunit\nunit-gui.exe" -register:user -targetargs:"C:\Myproject\bin\Myproject.Test.dll" -output:"C:\OpenCover\reports\OpenCoverreport.xml" 

But I've need to close the NUnit-Gui process to get the coverage result. I'd like to get the result without closing the main process.

Is there a way to run NUnit-Gui with code coverage without to close the process NUnit-Gui?

  • Is there a reason you want to use NUnit GUI instead of NUnit Console? The latter would be the normal approach, and means you don't need to worry about closing the gui process. – Chris Nov 29 '17 at 13:10
  • @Chris we use NUnit-GUI as interface to play tests, so we have to use NUnit-GUI. It's a pre-requisite and we can't change it. – Bruno Silva Nov 29 '17 at 13:27

1 Answers1

1

No. Sorry but OpenCover was primarily created for use with commandline test tools and running as part of the regular build.

If you are looking to get coverage per test (which it sorts of feels like) then you should have a look at the -coverbytest switch. You can also look at running individual tests using the command line to nunit-console.

Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56