Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
539 views
in Technique[技术] by (71.8m points)

.net - How do I use OpenCover and ReportGenerator to view Unit Test Coverage Results?

I'm a noob to using both OpenCover and ReportGenerator and I'm struggling a bit in understanding how to get them working. I'm using VS.NET 2012 'Professional' which means I don't have access to the built in unit test coverage tooling. I also have ReSharper installed, but don't want to pay for another utility in 'dotCover'

It looks like OpenCover and ReportGenerator will do what I need and I see the documentation that was downloaded alongside, but am missing some understanding. 1st off, when I download the nuget packges for both, what should my target project be? I have a multi layer app, so I'm assuming my unit test project correct, or does it even matter? I see in the documentation, I'm just pointing at the /bin (I think) of a solution using command line commands, so maybe I didn't even need to add these downloads to any particular project (could have been a test harness). Can someone tell me if I have this correct?

Once I have them installed, I'm trying to get unit test coverage metrics, and the docs that came with the package are not as clear as I hoped. Are there any good blog posts or links that walk through using these tool together to get the metrics?

question from:https://stackoverflow.com/questions/16591486/how-do-i-use-opencover-and-reportgenerator-to-view-unit-test-coverage-results

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to reply this article.

OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...