Reputation: 737
I have a XAML build definition running my MSTest unit tests and it takes a long time to execute all of them. I have 4 build agents(VMs with 1 core each) setup in the build environment. I am using Microsoft.TeamFoundation.Build.Activities.RunAgileTestRunner activity in the XAML which is inside a "Run on Agent"(Microsoft.TeamFoundation.Build.Workflow.Activities.AgentScope) activity.
Currently, the unit tests execute on one of the agent. I want to be able to distribute the unit tests to other available agents. Is there a way to do that through TFS configuration or by changing the build definition.
As a workaround, I can split up the unit test project into multiple projects and run them separately on the available agents however I won't be able to see the build summary in one place.
What would be best possible solution for this?
Upvotes: 0
Views: 743
Reputation: 30372
Just check this article : How to run automated tests on different machines in parallel?
The Recommended option:
Create multiple environments with each environment consisting of single machine (read single agent).
Divide all your test cases onto different sets and queue one set on one environment and other set on other environment and so on.
With this each set of test will run in parallel and on different machine.
Also reference below articles:
Besides, If upgrading to VNext build is an option, then you can easily achieve that by following the steps mentioned in below articles:
Upvotes: 1