Question

I am trying to incorporate code coverage into an application. Since I am using VS Express, OpenCover seemed like the best (read: only) option. The application is a silverlight web application, with multiple services. I have managed to get the silverlight code coverage to work with the sample commandline that was provided in the usage document. However, when I try the sample commandline for the service layer, it doesn't work. It gives

Service 'Application\Sample.Web.WCF\SampleService.svc' cannot be found - have you sp
ecified your arguments correctly?

This is the input that I pass:

OpenCover\OpenCover.Console.exe -target:"Application\Sample.Web.WCF\SampleService.svc" -service –register

I needed help on what kind of arguments is missing. Also in the service section of the usage manual, it mentions to input "Local Service" instead of "Local System". Where do I input that?

And how do I point to the .pdb files?

I saw a similar article called "How do I hook into a service with OpenCover?" but I do not understand how/what profile to pre-register using regsvr32 and also do I give the particular service or just the folder path?

Thanks in advance.

Was it helpful?

Solution

You are trying to use the syntax for running against a windows service when what you have is an app that looks runs under IIS (or iisexpress)

The service layer (.svc) that you have is not a windows service but a wcf-web service; use the same (similar) syntax as you did to launch your silverlight application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top