December 14, 2019

Multi Agent test execution in Azure

  December 14, 2019
As we already know we can add multiple agent machines to an agent pool and use those agent pools to run jobs.

Now what if we can run the different agent jobs parallel in those agents. Azure gives an option to do that.

We can select the agent pool to run our test as below.


Now we can decide on how many agents can be used in parallel for job execution.

By selecting the Multi-agent option inside the agent job in a build/release pipeline we can decide the number of agents.

Test Execution with multi-agent

If we are using this option for VsTest execution, VsTest task will divide the number of test cases equally (in here by 3) and will distribute among the available agents.

So if parallel execution is turned off in testing framework, one test case each will start in each agent machines and that agent will take the next test case in queue allocated while dividing the total test cases found in the task.

So this feature helps us to complete the test execution faster.

We have to take extra care if are enabling both parallel execution in our testing framework and multi-agent option  in Azure level.

This not only increase the agent utilization but also will make confusion in test scripts while reporting.
By default we will be writing to report files in a single thread, but combination of multi agent and parallel execution will break this concept. Result will be test failure with report not being generated.
logoblog

Thanks for reading Multi Agent test execution in Azure

Previous
« Prev Post

3 comments:

Fixing javascript error: Cannot read properties of null (reading 'querySelector') issue when using CSS identifier in selenium

 JavaScript is another way to interact with web elements when normal selenium methods fail to act. But one issue with javascript is, it does...