-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: webserver: add option for custom health check #34833
Comments
I took a look at the code and it should be enough if one would be able to pass
|
Hi Jan! Have you tried embedding your healthcheck in the |
This will not work as the start command does not exist so the second part of the |
Of course, you're right. I've marked this as P3 to collect feedback on how big the need for this feature is amongst the userbase. If you read this, please upvote the issue if you'd like us to ship it. |
would you also accept a PR to make the |
We're careful about extending our public API, so we always take community need into account. So let's wait for upvotes first. I'm sure you can find a workaround for your needs, feel free to post that for anybody else coming across this issue. |
🚀 Feature Request
add a new option to the playwright config
webServer.healthcheck
as an alternative to the existingwebServer.url
. this new config would be executed as a shell comand and retried until it either exits with exit code 0 orwebServer.timeout
is over.the healthcheck could also be a JS function that returns true/false instead of passing a path to a shell script.
Example
Motivation
Sometimes deciding if a webserver is ready for a test is more complex then just calling a healthcheck endpoint and expecting a status code 200. for example when running tests against a dockerized web application in CI we are using some complex data preseeding where the webserver itself does not know when the data is completely preseeded. but we could write a small script that returns if the preseeding is finished.
The text was updated successfully, but these errors were encountered: