Partilhar via


Record and play back manual tests

TFS 2017 | TFS 2015
Visual Studio 2017 | Visual Studio 2015

Note

Microsoft Test Manager has been deprecated. It has been replaced with Azure Test Plans, a fully featured test management solution. Microsoft Test Manager 2017, which shipped with Microsoft Visual Studio 2017, is the last version available.

Record keystrokes and mouse actions with Microsoft Test Manager while you are testing an app. You can then play back your actions quickly and accurately the next time you run the test.

Playback is useful for reproducing bugs. You can retrace the exact actions that the tester performed to the point where the problem was found. Playback also helps you run a test with different data, on multiple configurations, or where you have shared steps that are the same in many test cases. Playback also speeds up regression testing - that is, tests that you run from one sprint to the next to make sure that everything still works correctly.

You can record and play back tests in a wide range of desktop apps, and also web apps that you access through a supported browser. For a detailed list, see Supported configurations and platforms for coded UI tests and action recordings.


To use all the features described in this article, you must have one of the following subscriptions:

Or, configure Basic + Test Plans access level.

See Manual testing permissions and access.


Run Microsoft Test Manager on your client machine

To record and play back actions, you have to install Microsoft Test Manager on the machine where you'll run your tests. If you're testing a desktop app, install the latest version of the app and Microsoft Test Manager on the same machine. If you're testing a web-based app, install the app on a test server, and run Microsoft Test Manager on the machine where you'll run your web browser.

To get Microsoft Test Manager, install Visual Studio Test Professional or Visual Studio Enterprise

Run a test case

  1. Connect Microsoft Test Manager to your project, and select your current test plan.

  2. Select a test case and run it.

    Start the test from Microsoft Test Manager.

Record your actions during a test run

  1. In the Start Test window, select Create action recording.

    Create an action recording.

  2. After each step, make sure to mark that step Pass or Fail.

  3. If you want to pause your test, choose Pause.

    Pause the recording

  4. After you finish your test run, choose End Test. This makes sure the recording assigns your actions to the correct steps.

Caution: All your keystrokes and gestures might be recorded, including passwords, emails, chat messages, and other sensitive data.

Delete mistakes

Open the editing panel at the bottom of the test runner. You can delete actions there:

Edit the recording inline

Alternatively, you can run the test again and choose Overwrite action recording.

Keep or re-record shared steps

If you come to a sequence of shared steps, you might have already recorded them in an earlier test case. You can either keep the earlier recording or record them now, like this:

Record a shared step

You have to indicate when you finish recording the shared steps:

Record a shared step

Capture parameter values

If a test step requires a parameter value that you must type as text, that text is recognized and bound into the recording. When you play the recording back with other parameter values, the new values are used instead.

Parameters are bound if you type them.

Parameter values aren't bound if they're not typed as text, for example, when values are selected instead. When you play the recording back, you'll have to manually perform that step.

Play back an action recording

  1. Select your test and run it. Don't select the overwrite option in the Start Test dialog box.

    Start the test without overwriting the recording

    You can play the whole test, or play individual steps. The test runner will replay the keystrokes and mouse actions that you recorded.

  2. You have to check the result of each step. The recording doesn't check the outputs.

    Play each step and then check the result.

Help and support

Report any problems on Developer Community, get advice on Stack Overflow, and get support via our Support page.