Serverless - how to speed up tests over 300 times?
summary
Claim: run hundreds of browser tests in parallel on AWS Lambda to cut a 500-test Selenium suite of ~20s tests from ~3 hours to about 30s and cost roughly $0.17 per full run. Implementation uses AWS Lambda with 500 concurrent functions, Lambda Layers to package Chromium and chromedriver (decompress to /tmp), a Python runner invoking via SDK (request/response then switch to event + DynamoDB for results), CloudWatch, S3 artifacts and limits like the 15-minute execution cap.
AI-written summary · about
chapters (26)
- 0:00Start
- 0:39Why do we execute E2E regression tests?
- 1:23Problem: time
- 1:50Solution: automation
- 2:28Execution speed?
- 2:41Faster feedback: Faster delivery
- 2:55So... we automate tests
- 3:46And then... Test set grows...
- 4:40How to solve it this time?
- 5:27Tests Pyramid: more low level tests?
- 5:47Less frequent builds?
- 6:08More compute resources?
- 7:42Real solution: Cloud
- 8:12Parallel test execution
- 9:35AWS Lambda initial concurrency: 500-3000
- 10:02Lambda Layers
- 10:47Serverless Framework + AWS Lambda
- 21:02runner.py
- 27:45Full Test set (500 tests): about 30 seconds
- 28:22Execution cost: $0.17
- 28:53PoC: a few hundred lines of code
- 30:09Lambda invoke: event
- 30:34Test execution state storage
- 31:33How to extend this poC?
- 33:32Cloud is powerful
- 34:11DevOps Methodology
related talks
44mServerless – Automated Tests of web apps in the Cloud world
40mScaling Selenium to infinity using AWS Lambda
34mGood, Cheap, and Fast, Scaling Your Selenium Grid in the Cloud
46mScaling execution of ProtractorJS on AWS Lambda with Selenoid
54mContainerless in the cloud with AWS Lambda
02h 37mServerless Deep Dive
01h 00mServerless - reality or BS - notes from the trenches
35mEfficiency of Serverless Architectures with AWS Solutions
