opencover icon indicating copy to clipboard operation
opencover copied to clipboard

Sharing my experience of practice

Open malaikuangren opened this issue 12 years ago • 2 comments

Hi All,

I would like to share my experience of practice OpenCover and ReportGenerator here.

Why some of guys always would like to choose the ways of testing integrate OpenCover and IIS? I think one of the reason is running against IIS could combine the manual test and automated test (the tools as we knew like Load runner). So this will be the favorite choice for those guys. Because coverage 100% of code is what we are trying to make it in the testing stage.

So I had figured out a way to do so.

According the document of Wiki. I can start up a w3wp.exe process for OpenCover. w3wp.exe can run with a site id option.

So I tried to run it like below. OpenCover.Console.exe -target:C:\Windows\System32\inetsrv\w3wp.exe -targetargs:"-debug -s 1" -targetdir:%WebSite_Path% -filter:+[] -register:user -output:%CoverageResult_Path%

"-s 1" means start up the site which id is 1. The id can be found in advanced setting of the IIS site.

In my case . I just start up two processes of w3wp for site 1 and site 2. and press q will generate report xml for each one.

One of the good feature of ReportGenerator I want to vote up is it can generate report from multiple xml. you can found it usage in it's guide.

Thanks, Joe

malaikuangren avatar Aug 15 '14 02:08 malaikuangren

Thanks - I'll see if I can improve the IIS instructions in the wiki and PDF based on your guidance

sawilde avatar Aug 17 '14 21:08 sawilde

http://www.nuget.org/packages/OpenCover/4.5.3427

sawilde avatar Nov 27 '14 10:11 sawilde