locked
Code Coverage for Manual Testing RRS feed

  • Question

  • Hi,
    I am using VS 2005 Beta 2, and am wondering if it's possible to measure code coverage while executing manual tests within the VS test framework.   I am able to measure code coverage for unit tests with no problem, and I can include a manual test in my test run configuration, but I see no way to measure coverage while it is being executed.  Am I missing something?  Being able to do this would be very helpful.

    Thanks!
    Andrea

    Tuesday, November 8, 2005 9:48 PM

Answers

  • I believe that code coverage for manual tests doesn't work so well in beta 2, because the collection of data stops when all automated tests complete. To work around this, you can include a dummy unit test in the run that just calls MessageBox.Show(), and leave the message box up while you execute the manual tests. Then when you're done with the tests, you can close the message box to let the dummy test finish so the run will complete.

    In the RTM version, manual testing with code coverage works much like with any other test type, so you don't need to use the workaround.

    Wednesday, November 9, 2005 7:28 PM

All replies

  • Hello Andrea,

    To collect code coverage, you need "code under test". E.g. the executable or library you are testing. For instance, if I want to test notepad.exe, you need the symbols file for it, e.g. notepad.pdb. Then you can specify it in test run configuration by adding it from c:\windows\notepad.exe to code coverage instrumentation binaries.
    In all cases "manual testing" involves testing of some system, or in other words set of executable and library files. Those are the files, which you should specify for code coverage instrumentation.

    I hope that helps.

    Regards,
    Boris
    Wednesday, November 9, 2005 7:18 PM
  • I believe that code coverage for manual tests doesn't work so well in beta 2, because the collection of data stops when all automated tests complete. To work around this, you can include a dummy unit test in the run that just calls MessageBox.Show(), and leave the message box up while you execute the manual tests. Then when you're done with the tests, you can close the message box to let the dummy test finish so the run will complete.

    In the RTM version, manual testing with code coverage works much like with any other test type, so you don't need to use the workaround.

    Wednesday, November 9, 2005 7:28 PM
  • I upgraded to RTM today, and now manual testing code coverage works like a charm.  I experimented with the workaround you mentioned in Beta 2 and didn't have much luck with it, but no matter -- it was time to upgrade anyhow.  Thank you for the quick and helpful responses.

    Andrea
    Thursday, November 10, 2005 11:32 PM