Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenCover Isn't Passing Arguments to NUnit
    text
    copied!<p>I just grabbed NUnit, NUnit Runners, and OpenCover from Nuget. The NUnit parts are running great, both in GUI and console mode. But in PowerShell I can't seem to get OpenCover to work properly. Following various examples of usage, I ended up with this command:</p> <pre><code>.\OpenCover.Console.exe -register:user -target:"..\NUnit.Runners.2.6.1\tools\nunit-console.exe" -targetargs:"/noshadow C:\Path\To\Tests.dll" -filter:+[*]* -output:coverage.xml </code></pre> <p>I see the opening copyright info from NUnit, but then NUnit tells me:</p> <blockquote> <p>fatal error: no inputs specified</p> </blockquote> <p>Followed, of course, by standard help output describing the flags and whatnot. Then, naturally, OpenCover also displays an error indicating that nothing matched the filter and there are no results.</p> <p>So I tried running NUnit directly:</p> <pre><code>..\NUnit.Runners.2.6.1\tools\nunit-console.exe /noshadow C:\Path\To\Tests.dll </code></pre> <p>And it runs fine. Tests pass, everything's happy. Thinking that maybe the documentation and examples are outdated, I tried combining the <code>targetargs</code> directly into the invocation:</p> <pre><code>.\OpenCover.Console.exe -register:user -target:"..\NUnit.Runners.2.6.1\tools\nunit-console.exe /noshadow C:\Path\To\Tests.dll" -filter:+[*]* -output:coverage.xml </code></pre> <p>But the error output is still the same.</p> <p>Am I missing something in the proper usage of OpenCover? How can I get it to properly interact with the NUnit console runner?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload