retail-store-sample-app icon indicating copy to clipboard operation
retail-store-sample-app copied to clipboard

feat: added a playwright option to Load generator

Open StevenDavid opened this issue 3 months ago • 2 comments
trafficstars

Load gen Update

Issue #, if available: No logged issue

Description of changes: Removed extra files and consolidated to a specific approach to using artillery to run load tests. This approach uses playwright to better simulate user interactions with the website. You can now run tests locally or in fargate on ECS.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

StevenDavid avatar Aug 16 '25 20:08 StevenDavid

Hey @StevenDavid we'll probably need to discuss this PR more. It looks like it removes pretty much all the existing code which will break:

  1. Running it easily locally both by yarn and docker
  2. The CI tests
  3. Assets like workshops and blogs which rely on the packaged version of the load generator scenarios

Adding Playwright should probably just be another options alongside the existing "basic" HTTP version, not a replacement. And in my experience using Playwright really benefits from having a Dockerfile since installing the dependencies can be a pain.

Could we:

  1. Add this is a separate scenario beside the existing one
  2. Add Playwright as a dependency in existing package.json, especially so its pinned
  3. We'll need to update the Dockerfile.run but this might benefit from larger rework to just rebase it on an AL2023 image that installs node.js then we just yarn install to we get both artillery and playwright

niallthomson avatar Aug 21 '25 11:08 niallthomson

ok i added back in the standard load tests and updated the read.me to reflect the two options. Let me know if this looks good.

StevenDavid avatar Sep 09 '25 17:09 StevenDavid