Lab Management in TFS 2010 provides the ability to build, deploy and test in an automated way. This is achieved by creating a build definition which uses the LabDefaultTemplate.

With LabDefaultTemplate, a build can be triggered; it can be deployed to an environment and tests can be run on that environment. However, if there are multiple areas in your project like client, server, etc. which need separate deployment and testing, it not as straight forward.

You will need to modify the LabDefaultTemplate by following these steps:

  1. Open LabDefaultTemplate.xml in Visual Studio
  2. Right click the top most sequence and select Cut
  3. Go to Toolbox, “Control Flow” section and add the “Parallel” activity
  4. Paste the sequence from step 2
  5. Multiple sequences can be added inside the parallel activity in the same way

You will have to modify the variables in each additional sequence otherwise you will see an error since the variable already exists.

You can also add these sequences inside a condition and the condition can be an argument instead of a variable. This way you can run decide which activities to run.

Here is a template for parallel test execution for 3 components http://cid-6e7347d6ac73603f.office.live.com/self.aspx/.Public/TFS2010/ParallelTestExecution.xaml