I am trying to configure playwright testing in a monorepo.
The setup is –
Package A – This package is actual app where webpack dev server is defined and has all app codebase.
Package B – It is e2e-test package, this package has a lot of e2e tests defined for Package A.
In Package B’s playwright config, I have a define a webserver and that webserver should trigger yarn start in Package A.
This is my webserver config –
webServer: {
command: “yarn startPackageA”,
url: http://localhost:5000
,
},
In Package.json of PackageB, we define startPackageA: yarn –cwd ../packageA start.
So, while running tests from PackageB, it actually triggers start in packageA and opens up a webserver but playwright is not able to identify it and always fail with a webserver timeout.
I am not sure if its an issue with start getting triggered in a separate process?
Any help will be much appreciated. Thanks!
Playwright is not able to figure out if Pacakge A has start triggered.
Gauri Shankar Gupta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.