artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.04k stars 511 forks source link

playwright tests not running in fargate with latest artillery version v2.0.7 #2542

Closed prabhakaran-repos closed 8 months ago

prabhakaran-repos commented 8 months ago

Running playwright tests in fargate with latest artillery version v2.0.7 fails with the following error:

05 March 2024 at 16:31 (UTC+5:30) worker error, id: 1 browserType.launch: Executable doesn't exist at /ms-playwright/chromium-1097/chrome-linux/chrome -
05 March 2024 at 16:31 (UTC+5:30) ╔═════════════════════════════════════════════════════════════════════════╗ -
05 March 2024 at 16:31 (UTC+5:30) ║ Looks like Playwright Test or Playwright was just installed or updated. ║ -
05 March 2024 at 16:31 (UTC+5:30) ║ Please run the following command to download new browsers: ║

Version info: v2.0.7 Running this command: npx artillery run-fargate --region ap-south-1 tests.yml

The same tests works in v2.0.6

hassy commented 8 months ago

Thanks @prabhakaran-repos. Unable to reproduce with 2.0.7 on https://github.com/artilleryio/artillery/tree/main/examples/browser-load-testing-playwright. Is your test depending on a specific version of Playwright (in package.json) perhaps?

prabhakaran-repos commented 8 months ago

Did you try running the above tests in fargate? My test works locally with run command. Only with run-fargate, it fails.

This is my package.json, no direct dependency on playwright. "@aws-sdk/client-sqs": "^3.525.0", "artillery": "^2.0.6", "axios": "^1.6.7"

If I change package.json to use exact "2.0.6" version instead of "^2.0.6", it runs fine.

bernardobridge commented 8 months ago

Hi @prabhakaran-repos . Could you post a log of when you start your Fargate test? (it should say which files are being bundled).

I suspect that maybe your package.json file is being bundled to the worker, which is then causing artillery to be reinstalled and results in a browser mismatch.

prabhakaran-repos commented 8 months ago

Yes, package.json is bundled. Even earlier, it used to get bundled.

│ Name │ Type │ Notes │ ├────────────────────────────────────────┼─────────┼───────┤ │ tests/ui-tests/test.yml │ file │ │ ├────────────────────────────────────────┼─────────┤ │ │ tests/ui-tests/test.js │ file │ │ ├────────────────────────────────────────┼─────────┤ │ ├────────────────────────────────────────┼─────────┤ │ │ test-data/ui-tests/tokens │ file │ │ ├────────────────────────────────────────┼─────────┤ │ │ package.json │ file │ │ ├────────────────────────────────────────┼─────────┤ │ │ package-lock.json │ file │ │ ├────────────────────────────────────────┼─────────┼───────┤ │ @aws-sdk/client-sqs │ package │ │ ├────────────────────────────────────────┼─────────┼───────┤ │ artillery │ package │ │ ├────────────────────────────────────────┼─────────┼───────┤ │ axios │ package

bernardobridge commented 8 months ago

Hey @prabhakaran-repos 👋

This problem is happening due to keeping your package.json side by side with the test script, while including artillery as a direct dependency - this is one of the reasons why we don't recommend installing Artillery as a dependency.

To fix it, do one of the following: