Test controller/agent usage recommendations

Over the years we have had many people ask us on what is the best way to configure and use the test controller and agent for remote test execution. Here is a summary of the best practices that we advocate.

Setup and Settings

If you are on the latest VS2012U1+ or VS2013 you can ignore step#1&2

  1. Ensure that Visual Studio 2010 SP1 is installed on all machines
  2. Dev10 SP1 - http://www.microsoft.com/en-us/download/details.aspx?id=23691

  3. Next install the latest patch available
  4. http://support.microsoft.com/kb/2801364

  5. Open "<VSINSTALLDIR>\Common7\IDE\QTControllerService.exe.config" and add the following entry under
  6. <add key="ControllerJobSpooling" value="false"/>

    • Restart Controller
  7. Agent setup
    • Install the latest patch available
    • Open "<VSINSTALLDIR>\Common7\IDE\QTAgentService.exe.config" and add the following

    <add key="RestartTestExecutionProcessForEachRun" value="true"/>

    • Restart Agent
  8. Client Setup
    • Install the latest patch available
    • Open "<VSINSTALLDIR>\common7\ide\mstest.exe.config and add the following key

    <add key="DeleteTestDeploymentFiles" value="yes" />

  9. In your test settings
    • Keep bucket size as 1000. This will result in a test run going to smaller set of agents.


        <Buckets size="1000"/>

  10. Set test run timeouts to ensure no runs go beyond acceptable limits
  11. <Execution>

    <Timeouts runTimeout="7200000" />

    7200000 = 2hrs specified in milliseconds

  12. Run your tests in parallel if your agents are on a multiproc system
  13. <Execution parallelTestCount=0>


Other Recommendations

  1. Test Controller keeps all results for a run in memory. Therefore it is necessary that test runs be split into logical groups. We recommend you split tests into assemblies so that each test dll has <=5000 tests and/or run the TC in 64bit mode
    1. testcontrollerconfig.exe configure <… configuration parameters… > /platform64

  2. When any component of the Test Rig (any of the agents or controller) faces an issues (network disconnect, deployment failures, test crashes), the current test run is aborted. The probability of the test run getting aborted due to failure in agents reduces when we send one test run to a smaller set of agents. Keep a run limited to minimum number of test assemblies
  3. To scale out you should be using multiple such rigs and breaking up your test runs amongst these rigs as required.
Comments (2)

  1. DC says:

    I can't find QTAgentService.exe.config. My <VSINSTALLDIR>Common7IDE has QTAgent, QTAgent_35, QTAgent_40, QTAgent32, QTAgent32_35, QTAgent32_40, QTDCAgent and QTDCAgent32.

    It might be important to not that the build agents aren't on the same machine as the build controller

  2. DC says:

    Oh Test Controller/Agent and Build Controller/Agent isn't the same thing, right? That's my problem I think…

Skip to main content