So at this point you have your automation running using Microsoft Unit Testing Framework, you have set up your test environments, and you have test cases tied to your automation. So last how do we run the automated tests using MTM? This last step is you need to create a build, using the Microsoft Build Server. Then assign the test plan to this build.
Prerequisites
- TFS Installed
- MTM Installed
- Familiar with Source Control and have a solution running
- Have Microsoft Build Server installed and running.
Step 1 Add your solution to source control
1a. Go To Team Explorer, then click on Source Control. Click on the
icon on the top menu.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5_KwARVDDlmlyyBKAq27w2FcwKqsC_RqoNJfC1AYQpkObJI_w8hcq7sGO_UfdbRfBbFzLdtGTTdkhKTdaB9m62gcU8WV6j4cGoi2Q5aFLsGItRfGZ7X9_xwuMMtV5GBBUGswBHdydxbA/s400/5addIcon.png)
1b. Select the your solution folder, and the location that you want to store it in source control. Then click Map.
1c. Check in all of your solution into source control. Right click on the solution in Solution Explorer, and
click on Check in.
Step 2 Create a new build
2a Go to Team Explorer, and left click on builds and click on New Build Definition
2b Go through and fill out each page of the build definition, making sure to associate the build to your project in source control under the Workspace section.
2c Save Build Definition
Step 3 Queue new Build
3a. Right click on the build definition under Builds in the Team Explorer and click Queue new build.
Step 4 Associate new build to Test Plan
4a. In MTM go to Testing Center - Plan and click Properties, Under the properties there is a builds section. Select the build you just added, and save the properties.
Step 5 Run automated test cases
With your test cases associated to the automation, and a build associated to the test plan, you are now ready to run the tests. Go to Testing Center - Test, select the automated test case and click on run. Within a minute it should start running one of your set up test agents.
No comments:
Post a Comment