Automated Build-Deploy-Test using TFS 2010
More and more teams today are moving towards developing their products/services based on agile methodology. The product keeps changing frequently and if the bugs aren’t discovered in time, the cost of fixing them can be considerably high. Hence it’s important to have the ability to test on a frequent basis and in a rapid manner.
In Extreme programming which is a type of agile development, the term Continuous Integration has evolved which says Test Early and Often. Continuous Integration is the process of improving the product quality along with maintaining the rapidness of delivery by replacing the traditional practice of performing testing activities after the development is complete.
The automated build, deploy and test mechanism in TFS 2010 aims for Continuous Integration. It 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. Every code change is tested in this way and bugs are caught just in time.
TFS 2010 Architecture
TFS 2010 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:
- Source control mechanism
- Creating work items (User Story, Feature, Test
case, Bug, etc.)
- Build, Deployment and Test mechanism
- Reporting mechanism
- SharePoint Integration
System Center Virtual Machine Manager
System Center Virtual Machine Manager (SCVMM) is used to manage machines having virtualization enabled.
Virtual Machine Host
Virtual Machine Host (VM Host) is a machine having virtualization enabled and has to ability to host virtual machines on it.
Virtual Machine (VM) is a software implementation of a programmable machine. It is hosted on a physical machine having virtualization enabled.
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.
The lab agent communicates with the TFS application tier. It’s a background process running on the virtual machine to configure, monitor and report on status and errors.
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 virtual environments. These virtual environments are used to deploy build and run tests on VMs managed by the SCVMM.
TFS 2010 Workflow
The below diagram describes the step by step process to automate the Build-Deploy-Test workflow using TFS 2010.
TFS 2010 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.
Anuj is primarily focused on Software Testing and Automation. He has Extensive work experience on Manual testing, Automated testing, Performance testing and White Box testing. Anuj Contributes 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. http://www.anujchaudhary.com/
The MVP Monday Series is created by Melissa Travers. In this series we work to provide our readers with a guest post from one of our MVPs every Monday. Melissa is a Community Program Manager for Dynamics, Excel, Office 365, Platforms and SharePoint in the United States. She has been working with MVPs since her early days as Microsoft Exchange Support Engineer when MVPs would answer all the questions in the old newsgroups before she could get to them.