Editor’s note: The following post was written by Visual Studio ALM MVP Anuj Chaudhary
The automated build, deploy and test mechanism in TFS 2012 provides the ability to perform automated build, deploy and test on demand. A daily build could be scheduled which builds the latest code, deploys it to an environment and runs the tests on it. The build can be scheduled to run on a daily basis or on every check in to make sure that we test often and test early.
If you are familiar with the Automated Build-Deploy-Test workflow in TFS 2010, you had to use a dedicated SCVMM which was assigned to a Team Project Collection. To know more, please refer http://blogs.msdn.com/b/mvpawardprogram/archive/2011/10/17/automated-build-deploy-test-using-tfs-2010.aspx
You can create the same environment in TFS 2012 which is called “SCVMM Environment”
However, with TFS 2012 a new category of Lab Environment is introduced called "Standard Environment".
Unlike TFS 2010, with Standard Environment you don’t need to have your VM's configured with a specific SCVMM to run Build-Deploy-Test workflow. You can deploy builds on this environment and run tests on it. However, you cannot remotely start, stop or take snapshots of this environment.
Also unlike TFS 2010, you don’t need 3 different agents to be installed on the machines in the environment. You can just install the test agent on the machines or it will be installed for you as part of creating the environment.
Standard Environment Architecture
The architecture comprises of the components listed below.
Team Foundation Server
Team Foundation Server (TFS) provides the team the capability to coordinate and integrate their efforts. It provides the following:
It is a background process that manages a set of build agents.
It is a background process that receives build commands, runs the build and reports the results. Multiple build agents are managed by a build controller.
It is a background process that manages a set of machines which have the test agents installed.
It is a background process that receives test run commands, runs the tests and reports the results. Multiple test agents are managed by a test controller.
Test Manager is used to create test plans, tests suites, assign test cases and run tests. Multiple test runs can be managed and analyzed in the Test Manager.
Lab Manager is used to create and manage environments. These environments are used to deploy build and run tests.
Standard Environment Workflow
The below diagram describes the step by step process to automate the Build-Deploy-Test workflow using TFS 2010.
Build-Deploy-Test Workflow Output
The below figure shows the output of the Build-Deploy-Test workflow
TFS 2012 Build-Deploy-Test mechanism provides the ability to build, deploy and test each and every build in an automated fashion to make sure that regressions are caught in time. Due to the integrated Reporting capability, the management team is always aware of the current status of the product. Thus the team achieves the goal of rapid delivery along with maintaining the quality of the product.
About the author
Primarily focused on Software Testing and Automation. Extensive working experience on Manual testing, Automated testing, Performance testing and White Box testing. Contributing in Visual Studio ALM community and specifically in testing areas which involve Visual Studio Unit tests, Web tests, Load tests, Coded UI, MTM and Lab Management.