質問

If I use opencover to provide coverage anaylsis that runs on the buildserver for all builds of my product.

I'm under the impression that opencover (and presumably all the others) "instrument" the code to record hits.

Is this instrumented code "not safe" and/or slower and therefore I should not be using this code on the production servers?

I'm hoping that I have misunderstood the process as the prospect of having to do 2 builds (1 for coverage testing and actual for production) will slow down the buildserver.

役に立ちましたか?

解決

OpenCover (and NCover and PartCover) do not modify your binaries that you have produced via the build. They use the profiler API to instrument the binaries in-memory as they are being JITted (just-in-time compiled).

As such your binaries remain unmodified and are safe to use in production.

他のヒント

I have running unit tests and openCover for multiples projects in Release mode (in a build machine). You do not need make this for Debug mode if you do not have code dependent of that mode (like pre-compiled directives etc.). I hope to help you.

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