Coded UI Test in a Team Build
In this post, i will describe the steps required to add a Coded UI Test in a Build Definition.
Pre-requisites:- An existing Coded UI Test Project, A Connection to Team Foundation Server
0. On the Build Server, run the Team Build Service Host from the command line.
0.a. Open the services management console.
0.b. Stop the Visual Studio Team Foundation Build Service Host.
0.c. Open a command window and start the Team Build Service Host.
1. In the Solution Explorer, right click on the Coded UI Test Solution and choose Add Solution to Source Control.
2. Choose the folder in which you want to add this solution.
3. In the Pending Changes window, add a Comment and check in the code.
4. Open Team Explorer and Create a New Build Definition
5. Specify a name for the Build.
6. Leave the Trigger & Workspace tabs unchanged. [The default values are sufficient]
7. In the Build defaults tab, specify the Test Controller & a drop folder for the build.
8. In the Process tab, specify Projects to Build (add the project that you checked in in step 3), Test Assembly Filespec (*test*.dll) & Test Metadata files (choose the vsmdi file that you checked in in Step 3).
9. Save the Build Definition and Queue a new build.
10. In the Build Explorer, you can see the status of the Queued Builds. Double click on a Build to see its log.
In the detailed log, you can see the Coded UI Test getting compiled and then run.
