Continuous Integration is an agile process that rebuilds a project whenever the underlying code changes. Find out how to modify your Team Foundation Server projects' "build types" to implement continuous integration features such as automatic builds, testing, and problem notification.

WEBINAR:

On-Demand

Creating the Team Build Type
In Team Foundation Server (TFS) parlance, a "build type" is the complete definition of a software build. It specifies the project to be built, what configurations to build, where to build the software, where to put the build output, and which unit tests should be run following the build. Figures 1 though 7 show the process of creating the team build type.

Figure 1. Creating a New Team Build: Right click on the "Team Builds" folder under the DevXLibrary team project and select "New Team Build Type&#133;"

Figure 2. Name the Team Build Type: Provide a name for the new Team Build Type. In this example, I chose the name "Continuous Integration Build."

Figure 3. Select Solutions: Select the source code projects this team build type will compile when executed. Here, a single project was provided but more complex projects may contain several projects that can be selected as shown.

Figure 4. Select Configurations: Select the configurations you would like to build. The "Continuous Integration Build" type builds only the Debug configuration, but you can select other configurations, and build multiple configurations at the same time.

Figure 5. Select Build Location Dialog: You use this dialog to let Team Foundation Server know which machine to use when building the solution and where to drop the build results.

Figure 6. Select Build Options: You use this dialog to select Test Lists to run when the build process is complete. You can build Test Lists only with Visual Studio Tester Edition or Visual Studio Team Suite.

Figure 7. Review Build Type Selections: This dialog provides a summary of the settings and options you chose in the preceding steps. Press the Finish button to add the new team build type to the team project when you're satisfied.

To create a new build type, right click the "Team Builds" directory under the DevXLibrary team project and select "New Team Build Type ." I chose to name the build type "Continuous Integration Build." Figure 3 shows the window that allows you to select the projects that should be built. In this example, there is only one project. Out in the wild, a team project will consist of many projects that can be included in the build process. Then, Figure 4 allows you to select the configurations you would like to build. While only the Debug configuration is selected, you can select to build other

Figure 8. Team Build Tool: The Team Build tool builds a set of directories containing both source files required to run the build and to hold the results of the build process.

configurations and even multiple configurations in the same build. In the "Select Build Location" window shown in Figure 5, you provide TFS with the name of the server used to build the software and the location to drop the resulting files. In this case, we will be using the existing server named VSTS. Figure 6 shows the "Select Build Options" window. Using Visual Studio Tester Edition, test lists can be built that organize unit tests into logical groups. Unfortunately, test lists are only created by either the Tester or Team Suite editions of Visual Studio 2005. Test lists will not be included in this build type.

After you are finished creating the build type, run the build and explore its output. Expand the "Team Builds" directory under the "DevXLibrary" team project. Right click on the build type labeled "Continuous Integration Build" and select "Build Team Project DevXLibrary ." When the build starts, you will see a "Build Progress" dialog while the build starts. As soon as the build is underway, Visual Studio's Build window opens, showing each step of the build and its results. When the build completes, navigate to the directory you provided for the build drop location and examine its contents. Figure 8 shows the directory structure produced by the "Continuous Integration Build" process.

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.

Thanks for your registration, follow us on our social networks to keep up-to-date