Hello all
I've been recently tasked with rewriting our end to end tests. One of the changes I made was to use Playwright to launch the development server instead of doing this manually. This works fine locally and all my tests pass - however the moment I get into GitHub Actions the tests get stuck with no errors.
Any idea why this might be? Any way I can actually debug this? I tried to use DEBUG=pw:api
and DEBUG=pw:webserver
with no luck.
This thread is trying to answer question "Why do tests using Playwright work locally but get stuck when run on GitHub Actions and how can this be debugged?"
Oh boy am I familiar with this. 🙂 We're currently fighting this with something other than Playwright. The problem we're facing is that it happens inconsistently. I can tell you that you will not get anything useful out of GitHub with debug turned on; just a stack trace saying the operation was canceled.
I'd guess your tests aren't starting since there's no output after line 18. Do you have a timeout set in your workflow? Can you add steps to your actions that just output the current time so that you can see time elapsed?
Another possibility is that the runner is resource starved and runs out of memory.
This action allows you to ssh into the runner for debugging. We're about to add it to our workflow to try to figure out this problem. You might find it helpfull. You can ssh into the runner and see what it's up to. https://github.com/mxschmitt/action-tmate
I don't have a particular timeout for the workflow itself only the Playwright tests which never even hit their timeout setting. I'll likely add time outputs. Also gonna checkout tmate - thanks for that suggestion
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].