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.07k stars 512 forks source link

Playwright Fargate HTTP_PROXY support #3266

Closed igor-dmitriev closed 4 months ago

igor-dmitriev commented 4 months ago

Version info: 2.0.16

I expected to see this happen:

I would like to run the Playwright test on Fargate using HTTP_PROXY, but it does not work cause HTTP_PROXY param is ignored, apparently it is not supported

Instead, this happened:

HTTP_PROXY param does not work, I think it should be done through playwright config, that is somehow is configurable - https://playwright.dev/docs/network#http-proxy

hassy commented 4 months ago

You should be able to enable proxy support via contextOptions - https://www.artillery.io/docs/reference/engines/playwright#configuration. Any config set under contextOptions is passed right through to Playwright's Browser.newContext() method)

https://playwright.dev/docs/api/class-browser#browser-new-context-option-proxy

For example:

config:
  engines:
    playwright:
      contextOptions:
        proxy:
          server: https://myproxy.net