質問

As a part of code coverage testing, I need to test several services. The OpenCover github mentions the ability to do this (Issue #36), but doesn't tell you how. The wiki "Usage" page doesn't mention anything about this. opencover -? brings up a mention of the -service switch, without any description of what it does, exactly or how to use it. Can anyone tell me how this switch works and how I can hook into a service with it?

役に立ちましたか?

解決

When you install OpenCover you will find that there is a document called Usage.rtf that describes how to use OpenCover against a service.

Basically you have to run OpenCover under an Administration account with pre-registered Profilers (use regsvr32). The service switch should supply the name of the service.

It is quite tricky to do which is why I recommend you create your service with a console mode of operation as then doing coverage under a normal user account has less restrictions and is much easier to setup.

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