How to: Capture a Screenshot while Running a Test

While you run a test using Test Runner , you have the option to create screenshots that can be attached to the test results. The screenshots can be useful as supporting material related to bugs, for isolating code defects, or for refining user interface designs. For more information, see How to: Submit a Bug using Test Runner

Test Runner  lets you take the following types of screenshots:

  • Rectangular screenshot   A rectangle that you can define.

  • Full screenshot   The entire screen.

The window is saved in an image file that has the .png extension. It is listed as part of the test step.

Requirements

  • Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional

Capturing screenshots in Test Runner

To capture a screenshot using Test Runner

  • Choose the arrow next to Capture Rectangular screenshot on the toolbar and choose either Capture rectangular screenshot or Capture full screenshot.

    The window is saved in an image file that has the .png extension. It is listed as part of the test step.

    Note

    You can add annotations to the screenshot by double-clicking it. By default, Paint should start and you can add your notes and then save the file.

See Also

Tasks

How to: Attach a File while Running a Test

How to: Run Manual Tests

Concepts

Running Manual Tests Using Test Runner