'How to configure Playwright to run tests against a different server?
I'm writing tests for playwright and running them against my local server (not written in JS, my FE is)
I was wondering though when I run these on CI, should I run them against dev or spin up a local backend?
Is there config I can use to say depending on the env you are running the tests in, choose a different server?
Is there any generic docs online about e2e tests and servers?
Solution 1:[1]
You should be able to set this in the playwright.config file. You can set up multiple projects to dictate what values to pass through:
https://playwright.dev/docs/api/class-testinfo#test-info-config would be a start & https://playwright.dev/docs/api/class-browserserver may help
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | OrdinaryKing |
