, , , , , ,

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.


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.


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.


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.


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‘.


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


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