varuna srivastava

Improving Test Run Time moving to AWS Lambda

Over time, we had created a significant set of Selenium tests which we were running over a Selenium Grid. The runtime had reached five hours, and we were feeling the pain in the feedback delays which revealed the need for parallel execution. Previously, we used the Selenium Grid Docker container for each test run. This way, we were able to run 5 concurrent threads for test execution, which took an average of 45 minutes.

We had to scale test but we couldn’t run more than 5 concurrent tests as the containers hit performance issues and we had a hard time getting reliable tests outcome. This led us to move to AWS Lambda.

In this talk, I will explain how we started with a very small suite of five tests to first build the AWS Lambda infrastructure, learn to use the tools of working in the new environment and achieve reliability of the test runs over a timeframe of 45 days. I will walk you through how we selected to move all tests in feature-based batches, with a continuous focus on the reliability of the tests. I will explain from our challenges on the way to now run all our tests within the timeframe of the longest test, improving our feedback time significantly.

As part of Demo, I will walk through a sample project in Github where I will explain how we can scale our UI tests using AWS lambda.

Outline/structure of the Session
1. Challenges faced in the project and why we moved away from selenium grid to Lambda.
2. What is AWS Lambda and How does it work?
3. How does AWS Lambda help in scaling tests?
4. Recorded Demonstration:
How to write a first lambda function.
How to run and scale the tests.
How to view results in aws console.

Key takeaways:
How to get started with writing the first lambda function
How to make your existing test run as part of Lambda.
How to set up infrastructure in AWS to run tests there
How to focus on reliability in small batches
What are the differences in running tests on AWS Lambda vs Selenium Grid

varuna srivastava

Lead Quality Analyst

Varuna is a technical tester who's worked on award-winning projects across a wide variety of technology sectors ranging from retail, travel, financial and the public sector; working with various web, mobile, and IoT technologies. Varuna is a passionate advocate of shipping quality code to production using Agile practices. When not working, Varuna likes to get her hands dirty on experimenting on her culinary skills. Most of her weekends are spent in C()()kgraphy i.e. Cooking +Photography!

varuna's full speaker profile