How to: Create an Action Recording
Updated: April 2011
In Test Runner, you have the option of recording a manual test so that it can be played back later or reused in other tests. You do this by creating an action recording. An action recording is useful in manual tests that you need to run multiple times and for recycling common steps in different manual tests that contain shared steps. For more information, see How to: Create an Action Recording for Shared Steps.
After you create the action recording, you can invoke it during a test. When an action recording runs, it automatically plays back the steps that you recorded. For more information, see How to: Play Back an Action Recording.
Input to an Input Method Editor (IME) is not supported for creating an action recording because an action recording cannot aggregate actions into a single action. (An IME is a program that allows computer users to enter complex characters and symbols, such as Japanese characters, using a standard keyboard.)
The following procedures describe how to create an action recording.
If you have configured test settings to create an action log for the test being run, selecting the Create action recording option when you start a test will use the settings that you configured. If you did not configure the actions diagnostic data adapter in your test settings, then the default values are used to create your action recording. For more information, see How to: Record User Interface Actions for Manual Tests Using Test Settings.
To load a test into Test Runner
Open Microsoft Test Manager.
To display the Microsoft Test Manager window, click Start, and then click All Programs. Point to Microsoft Visual Studio 2010 and then click Microsoft Test Manager 2010.
On the center group switcher, click the down-arrow and then click Testing Center.
On the center group menu bar, click Test.
In the menu under the center group menu bar, click Run Tests if it is not already selected.
In the left pane, under Run Tests, select either the test plan or the test suite listed under the test plan that contains the test that you want to run.
The right side pane displays the test cases within the selected test suite.
In the right side pane, click the test case and then click Run.
The Test Runner opens.
Select Run with options to specify a build to run the test on, or to override the test settings and environment settings for the test plan. For more information, see How to: Override Settings in Your Test Plan For Test Runs.
You must first load the test that you want to record into Test Runner. For more information, see the previous procedure, "Load a Test into Test Runner."
To record an action recording
Upon loading a test from Microsoft Test Manager into Test Runner, you are prompted to Start Test with the option Create action recording. Select Create action recording and click Start Test.
If the test contains an existing action recording, you are prompted with the option Overwrite existing action recording. Select this option to create a new recording that replaces the previous action recording, and then click Start Test.
The action recording can be played by using the Play option in the toolbar. For more information, see How to: Play Back an Action Recording.
You can specify which applications to record in your test settings for the actions diagnostic data adapter. If you have configured test settings to create an action log for the test being run, selecting the Create action recording option when you start a test will use the settings that you configured. If you did not configure the actions diagnostic data adapter in your test settings, then the default values are used to create your action recording. For more information, see How to: Record User Interface Actions for Manual Tests Using Test Settings.
Each test step including launching the application is recorded after you click Start Test.
If your test setting includes collecting IntelliTrace data, you must start the application after the test is started. For more information, see How to: Collect IntelliTrace Data to Help Debug Difficult Issues.
Perform the steps of the test case and mark each step with a result. Use the drop-down arrow to the right of the step and select either Pass or Fail.
The words Currently Recording appear in the title bar of each application that is being recorded. An action recording section, presented as a blue indicator, is displayed to the right of the test. The blue indicator is divided into individual sections that correspond to the steps of your test.
If you do not mark each test step as either passed or failed, then the action recording section can span several test steps. It includes all unmarked test steps since the last step that was marked as passed or failed.
(Optional) Recorded actions can be deleted at any step while the test is running. To delete a recorded action, follow these steps:
Click the up-arrow displayed in the bottom panel of Test Runner.
All the actions which took place up to this step are displayed.
Select the action you want to delete and then right-click the selection and point to Delete recorded actions.
Click End Test.
In the toolbar at the top of Test Runner, choose one of the following options:
Click Save and Close to save your test results to the Team Foundation Server and close Test Runner.
Click Save to save the test results to the Team Foundation Server.
Click Close to close Test Runner and not save the test results.
If an existing action recording already exists for the test, the Test Runner - Microsoft Test Manager dialog box appears. You have the option to either Overwrite existing recording or Discard new recording.
The action recording can now be replayed when you run this test case in the future. For more information, see How to: Play Back an Action Recording.