Ho to get the code coverage while testing remote services RRS feed

  • Question

  • Hi , 

    Can anyone help me out with the code coverage of the WCF services deployed remotely .

    We have a WCF service deployed remotely with some operation contracts exposed . We are doing the API testing for those operation contracts using unit test framework.

    However I also need to get the code coverage for the part of code I am covering through my test cases . 

    I know how to get the coverage when the code is deployed locally but can anyone tell me the fruitful steps for doing for the services deployed remotely.

    Kapil Gupta

    Thursday, November 28, 2013 9:40 AM


  • Hi,

    You can only use code coverage when you run an automated test, and only from the computer that is running the test. Remote collection is not supported.

    If you want to collect code coverage for remote services, you can reference this blog to use vsperf/vsinstr:
    Code Coverage using Visual Studio 2008’s Code Coverage tools

    You can refer to the following blogs to know about how code coverage works in details:
    Code Coverage Instrumentation

    Code Coverage Collection

    Best regards,

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Amanda Zhu Thursday, December 5, 2013 1:33 AM
    Friday, November 29, 2013 5:09 AM