Skip to content

Show HN: Load Testing with Playwright

13 pointshassy7 comments
On HN

Hi HN fam! Hassy from Artillery (YC S21) here. Playwright got a lot of love on HN today [1] - rightfully so, it's an incredible project! - so I thought I'd resubmit [2] an open-source project that lets you run load tests with existing Playwright scripts.

GitHub link: https://github.com/artilleryio/artillery-engine-playwright

The basic motivation for creating the project is that load testing complex web apps is a real pain in the ass. It takes ages to build out test scripts for a non-trivial web app with traditional API-oriented tools. If you've ever had to do it, you know how frustrating it can be.

So we thought, why not try load testing with real browsers instead? Especially if we can just reuse existing E2E testing scripts we already have? (based on Playwright of course!) Turns out it can work very well.

Is load testing with real browsers expensive? Yes, sort of - relative to more traditional load testing. This project lets you max out developer productivity points at the cost of... well, cost. But! developer time is expensive! And cloud compute is cheap - running 1,000 4 vCPU/12GB RAM containers on AWS Fargate for an entire hour is going to cost ~$220 in Fargate fees for example.

The project is still in its early days, would love any feedback! <3

1. https://news.ycombinator.com/item?id=30083042 2. https://news.ycombinator.com/item?id=29402399

Comments

I'm biased, but most likely you could reduce your cloud costs around 63%. Would suggest to run savings report at https://cast.ai (it's free) and see where you could end, maybe you will be able to implement some recommendations by your own not activating platform.

Very cool! What are you using to do the Playwright recording?

hassyOP

Playwright's built-in codegen tool creates scripts that can be run as load tests with this project :)

https://playwright.dev/docs/cli#generate-code

Woah cool!!

This is very cool. Running tests on browsers has always being a pain. Is this something that could be run from within a container?

hassyOP

Yes! that's how we ourselves run it. The project includes a ready-to-go Dockerfile: https://github.com/artilleryio/artillery-engine-playwright#u...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.