Tags

, , , , , ,

For this you’ll need:
• Microsoft Test Manager
• Visual Studio Enterprise
• Team Services

When using the following method, I strongly recommend putting the manual test scripts and application source code in two separate projects, or there’s a risk of overwriting the latter. I started off by creating a new project in Team Foundation Server for the automation scripts, then connected the Test Manager project, and created a test plan.

connecting-test-manager

Creating and Recording a Manual Test
A test case needs to be added to the test plan in Test Manager. At this point only the manual instructions and expected outcomes need to be entered. When done, make a note of the test case number.

tm-create-new-test-case

Now the test script is ready to be run, and an action recording can be made. When completed, the test case should be updated with two XML attachments and an action log file.

tm-test-case-attachments

Test Playback
Now you should be able to run the test case from Test Manager, by opening the test panel as before, and clicking the Play All button, just to confirm it works.

tm-replay-all

Import recording into Coded UI Test
Test Manager action recordings can be imported into a Coded UI Test as C# code. In Visual Studio, connect Team Explorer to the TFS project. Next, create a new Coded UI Test Project, but instead of creating a recording, select the option to ‘Use an existing action recording‘.

generate-code-use-existing

This will display the Work Items Picker. The quickest way to find the action recording is to enter its test case number.

vs-work-items-picker

The test recording is now converted to a C# Coded UI Test.

Advertisements