locked
Regarding the Unit test Coverage in Visual studio 2012 RRS feed

  • Question

  • I have been using the Visual Studio 2012 for my development purpose. But, I could not able to get the code coverage for my binaries.

    my project structure:

    there are three projects in my solution

    1.Main boost project (exe) to execute the boost test cases.

    2.wrapper (dll)

    3.main implementations (service exe )

    i will call the APIs in boost exe, it will call the wrapper, then it will come to te main implementations.

    i could see only the boost project and wrapper code coverage., but i could not get the main implementation (service exe) code coverage..

    even i placed the pdb with the bianries.

    pelase let me know if anything need to be changed.

    • Moved by May Wang - MSFT Wednesday, October 2, 2013 9:15 AM for a better support
    Tuesday, October 1, 2013 5:15 PM

Answers

  • Hello,

    Based on Allen’s reply in this thread: http://social.msdn.microsoft.com/Forums/vstudio/en-US/a24d57d4-e6a0-427f-80cc-689e194de4d9/code-coverage-and-wcf-services?forum=vstest

    We currently only support solutions that are hosted from within Visual Studio. So if you want to do code coverage for a windows service or any component not being run as a part of VS you can either use the VS2010 toolset (vsperf/vsinstr) which is available in VS2012 as well.

    For more information and steps, please see my reply in that thread and reference this blog: Code Coverage using Visual Studio 2008’s Code Coverage tools

    Best regards,


    Amanda Zhu 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. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    • Marked as answer by Amanda Zhu Tuesday, October 15, 2013 1:43 AM
    Monday, October 7, 2013 5:46 AM

All replies

  • Hi,

    According to your issue, I have moved this case to Visual Studio Unit Testing forum for a better response. There will be more experts provide support for you there.

    Hope you can understand.

    Best Regards,

    May


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, October 2, 2013 9:14 AM
  • Hello,

    What type of service exe do you work with? Is it a windows application? Or a Web App? The service is WCF service? Or web serivce?

    Whether the service will be executed when you run unit test?

    Best regards,


    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, October 3, 2013 4:45 AM
  • am using windows com service exe.

    yeah., its executing.,


    NAVEEN

    Friday, October 4, 2013 2:51 PM
  • Hello,

    Based on Allen’s reply in this thread: http://social.msdn.microsoft.com/Forums/vstudio/en-US/a24d57d4-e6a0-427f-80cc-689e194de4d9/code-coverage-and-wcf-services?forum=vstest

    We currently only support solutions that are hosted from within Visual Studio. So if you want to do code coverage for a windows service or any component not being run as a part of VS you can either use the VS2010 toolset (vsperf/vsinstr) which is available in VS2012 as well.

    For more information and steps, please see my reply in that thread and reference this blog: Code Coverage using Visual Studio 2008’s Code Coverage tools

    Best regards,


    Amanda Zhu 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. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    • Marked as answer by Amanda Zhu Tuesday, October 15, 2013 1:43 AM
    Monday, October 7, 2013 5:46 AM
  • Thanks for your information Amanda Zhu<abbr class="affil"></abbr>.

    I just need to know whether i can able to generate the code coverage if i change the tool set to VS2010.???

    Regards,

    Naveen

    NAVEEN

    Friday, November 8, 2013 6:33 AM
  • Hi,

    It is not related to the VS version. You need to use the command line tool:vsperf and vsinstr to generate code coverage.

    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.

    Friday, November 8, 2013 7:05 AM