Share via


How to: Attach a File while Running a Test

While you run a test using Test Runner, you have the option to attach files to the test, such as requirements for the application or log files that the application generates. The files can be attached to a test step.

The files can be useful as supporting material related to bugs to help isolate code defects. For more information, see How to: Submit a Bug using Test Runner.

Requirements

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

Attaching a document in Test Runner

To attach a document to a test using the Microsoft Test Runner

  1. Choose Add attachment to step result on the toolbar.

  2. Browse to the file that you want to attach and choose Open.

    The document is attached to the test.

Security

Precautions should be taken when attaching and viewing potentially unsafe attachments such as .bat, .exe, .vbs, and .js files because they might contain viruses.

See Also

Tasks

How to: Capture a Screenshot while Running a Test

How to: Run Manual Tests

Concepts

Running Manual Tests Using Test Runner