質問

Is it possible to run opencover without running unit tests? I have the TestResults.xml from NUnit and want to pass this to OpenCover without running the unit tests again. Is this possible?

役に立ちましたか?

解決

Q1. Is it possible to run opencover without running unit tests?

OpenCover can run against most .NET application that can be launched from the commandline. With a little effort you can get it to run against a service like IIS.

Q2. I have the TestResults.xml from NUnit and want to pass this to OpenCover without running the unit tests again. Is this possible?

No, it will not be able to do what you want as the information in the TestResults.xml is about tests (pass/fail) and is not enough to determine what code was actually executed by those tests.

Just run your tests with OpenCover using the nunit-console.exe as the target - instructions exist in the documentation provided to help you.

他のヒント

I do not know OpenCover but from what I guess about dotCover it needs to go alongside the unit tests as they progress through your code line by line. Code coverage is then determined by what percentage of your code has been visited.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top