Tech Blog

Testing

Parallel Execution of Selenium Scripts in Azure Virtual Machines for Efficient and Speedy Results

By Madhu Basavaraj2 min read
← Back to blog

Summary: 

As more and more companies use automation suites in an effort to meet 100% coverage for better and effective testing, a common concern that every team has is ‘How to reduce the long execution time and reap benefits at the same time’. With the traditional sequential execution approach, automation script execution takes longer time to complete and this time keeps increasing with an increase in the number of test cases. Hence, the sequential execution approach is not an ideal option to meet the requirements of continuous development and delivery model. In this article, we are describing a solution with an intent to execute each and every test case (not just Sanity) and still get faster feedback through ‘Parallel Script Execution’.

Technical Solution Vs. Mindset:

For optimal usage of test cases in parallel execution, during the test definition stage test cases must be created as independent as possible even in the integrated environment. Moreover, grouping of test cases must not be sequential and rather be performed on the module basis. 

How To Achieve Parallelism : 

Technical Insight– Parallel execution is dependent on the configuration that is made. Test agents for execution need to be created and these agents should be added to an agent pool. Releases for triggering the execution should be created with Agent job configuration as ‘Multi agent’. Additionally, VS Test assemblies should be updated with option ‘Based on Agents and Tests’. After Release creation, the tests will be discovered and distributed against the test agents for execution. The execution time can further be reduced dynamically based on the count of available virtual machines (VMs) in the respective agent pool. 

VM Management and Cost Control:

  • By implementing PowerShell scripts to start and stop the VMs, usage of VMs will be controlled.
  • Thus, the billing of VMs can be controlled as well based on the CPU utilization. 

Conclusion:

Parallel execution will help  in Significant reduction of execution time for big automation suites, produce Quick results for every build validation and helps in inclusion of automation in CICD.

Parallel execution using virtual machine’s will accelerate the phase of test automation, dynamic scaling of virtual machines will further get the execution time down. Cloud/Azure learning and implementations opens the scope of learning as well as standard of test automation with better and efficient utilization of Automation scripts.

Keep reading

You may be interested in

Browse all articles →
Software Testing: Challenges and Solutions
February 8, 20244 min read

Software Testing: Challenges and Solutions

Introduction – Testing software is a crucial aspect of the development process. It makes sure that the product’s functionality works as expected, fulfills the user requirements, and makes sure it works without errors. In this blog, we will list down some of the most common challenges faced in software testing and conclude with how to […]

By Saboor ChandshahaRead More →
Streamlining Software Quality: The Power of Automating Black Box Testing
February 8, 20244 min read

Streamlining Software Quality: The Power of Automating Black Box Testing

Introduction :  In the dynamic realm of software development, ensuring the robustness and reliability of applications is of paramount importance. Black box testing, a technique that assesses software functionality without requiring knowledge of its internal code, plays a vital role in identifying potential defects. As the complexity of software systems continues to escalate, the manual […]

By Anthony Gilchrist G SRead More →
Implementing best practices for end-to-end testing in cloud migration
January 31, 20245 min read

Implementing best practices for end-to-end testing in cloud migration

Importance of End-to-End Testing Assume an organization’s core systems are now hosted on the cloud—a complex ecosystem linked by data threads. End-to-end testing is the foundation upon which the reliability and performance of this interconnected web is built. This rigorous testing technique makes it possible to detect vulnerabilities, optimize operations, and improve user experience. Active […]

By Rahul ChakravartiRead More →