问题
I am trying to use OpenCover for a calculator application, written in C#.
I have opened it in Visual Studio 2013 and installed the OpenCover and Report Generation packages using the package manager console. I cannot understand the other commands to continue. Specifically what does it mean by -target<target application>
?
I cannot understand a single step to continue.
回答1:
When you install OpenCover it would/should have presented you with a readme.txt that provides a link to the wiki http://www.github.com/OpenCover/OpenCover/wiki/usage - there is also a usage.pdf installed with the tool.
-target means the target application, this can be the app you have just written or a coverage tool such as nunit that would run parts of your application code whilst it is running the supplied tests.
回答2:
If you're happy with any code coverage without it specifically needing to be OpenCover, then see my answer here.
Using the AxoCover plugin makes it very quick and simple to get your NUnit tests displaying their code coverage.
来源:https://stackoverflow.com/questions/33620340/opencover-testing-tool-usage-in-visual-studio-2013