How to: Capture a Screenshot While Running a Test
This page is specific to:.NET Framework Version:4.0
How to: Capture a Screenshot While Running a Test

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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:

  • Window screenshot   For capturing the specific window associated with the application under test.

  • Rectangular screenshot   A rectangular 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 under Attachments in the Test Step Results tab of the Properties pane.

Capturing screenshots in Test Runner

To capture a screenshot using Test Runner

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

    The window is saved in an image file that has the .png extension. It is listed under Attachments in the Test Step Results tab of the Properties pane.

    NoteNote

    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

Concepts

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View