locked
Code coverage of files in a Win32 Console application RRS feed

  • Question

  • How can we find code coverage of files in a Win32 Console application in VC 2012. The console is launched using CreateProcess.

    I added UnitTest project in the same solution of the console application. And in the unit test function I launched the Win32 Console using CreateProcess. But coverage results do not show files in the console application.

    Saturday, September 8, 2012 12:36 PM

Answers

  • Hi Amanda,

    I am sorry, It is working.

    The exe file name I generated was wrong. So Create Process did not launch. I missed this because the Console application was without much code to run.

    I make a simple fresh application (to reply your mail). It is working now.

    Thanks very much for your reply.

    Regards,

    Jackson

    • Marked as answer by Amanda Zhu Tuesday, September 11, 2012 5:41 AM
    Tuesday, September 11, 2012 5:01 AM

All replies

  • Hello Jackson,

    Thank you for posting in the MSDN forum.

    You wrote “And in the unit test function I launched the Win32 Console using CreateProcess.”.

    Can you provide more detailed information about your Win32 Console application and the unit test function so that we can repro your scenario?

    In addition, you said that “But coverage results do not show files in the console application”.

    I would like to know what file you want to be shown in the code coverage results.

    And if possible, you can provide a screenshot of the code coverage result for resolving this issue.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 10, 2012 2:49 AM
  • Hi Amanda,

    I am sorry, It is working.

    The exe file name I generated was wrong. So Create Process did not launch. I missed this because the Console application was without much code to run.

    I make a simple fresh application (to reply your mail). It is working now.

    Thanks very much for your reply.

    Regards,

    Jackson

    • Marked as answer by Amanda Zhu Tuesday, September 11, 2012 5:41 AM
    Tuesday, September 11, 2012 5:01 AM