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.
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.
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.
Thanks for giving a great information about AzureDevOps Good Explination nice Article
ReplyDeleteAzure DevOps Online Training
Microsoft Azure DevOps Training Courses
Microsoft Azure DevOps online Training in Hyderabad
Nice Post. I like your blog. Thanks for Sharing.
ReplyDeleteMicrosoft Azure DevOps Online Training
Really nice post. Thank you for sharing amazing information.
ReplyDeleteDevOps Training
DevOps Online Training
DevOps Training in Ameerpet