Skip to content
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

Playwright test timing out - flaky #1854

Closed
tijlleenders opened this issue Mar 18, 2024 · 14 comments
Closed

Playwright test timing out - flaky #1854

tijlleenders opened this issue Mar 18, 2024 · 14 comments
Labels
bug Something isn't working hacktoberfest

Comments

@tijlleenders
Copy link
Owner

Describe the bug
Playwright test is timing out. This is seen as a PASS in CI.
image

To Reproduce
See GH Action:
image

@tijlleenders tijlleenders added the bug Something isn't working label Mar 18, 2024
@tijlleenders tijlleenders moved this to In progress in ZinZen® Mar 18, 2024
@tijlleenders tijlleenders moved this from In progress to Parking lot in ZinZen® Mar 18, 2024
@tijlleenders tijlleenders moved this from Parking lot to temp to drag faster in ZinZen® Mar 18, 2024
@tijlleenders tijlleenders moved this from temp to drag faster to Parking lot in ZinZen® Mar 18, 2024
@vinaybadgujar102
Copy link
Collaborator

@tijlleenders the test shows passed because as mentioned in the line 39, one test is flaky means it failed initially but passed on retry. you can refer to https://playwright.dev/docs/test-retries.

Tests sometimes fail because the elements related to sharing/collaboration feature doesn't always work as expected. For ex. when user shares a goal, the reciever should see it after refreshing the page, but this doesn't always happen. This unpredictable behavior is probably why the test passes when run again

@github-project-automation github-project-automation bot moved this from Parking lot to Done in ZinZen® Mar 21, 2024
@tijlleenders
Copy link
Owner Author

main branch is failing after soft delete PR. This is not a good situation. Please find a fix.

@tijlleenders tijlleenders reopened this Mar 21, 2024
@vinaybadgujar102
Copy link
Collaborator

@tijlleenders the test fails when it tries to accept the changes made to the goal during collaboration. I don't know why this is happening. This works fine when I do it myself (manually), but the test isn't passing. I need to look into this thoroughly, it might take some time.

@tijlleenders
Copy link
Owner Author

tijlleenders commented Mar 23, 2024

You mean running the same test in an automated way - so not manually - works on your machine?

@vinaybadgujar102
Copy link
Collaborator

No. What I mean is that if I, as a user, perform the steps mentioned in the test manually, it works correctly. However, it does not work in the test environment.
It is not working on my machine either.

@tijlleenders
Copy link
Owner Author

Ok, well then the first step is to get them working in an automated fashion on your local machine.

  • If that works, we look at the difference in run environment vs CI.
  • If not, it's the automated test that is the issue, not the environment/CI. Probably you need to add a refresh (otherwise you won't trigger fetch updates) - or add a longer wait.

@vinaybadgujar102
Copy link
Collaborator

I tried everything I could to make the test run correctly (added refreshes, waits, page changes, playwright version updates, etc) but it doesn't seem to work, don't know why.

@tijlleenders
Copy link
Owner Author

Ok, well then the first step is to get them working in an automated fashion on your local machine.

* If that works, we look at the difference in run environment vs CI.

* If not, it's the automated test that is the issue, not the environment/CI. Probably you need to add a refresh (otherwise you won't trigger fetch updates) - or add a longer wait.

Does it work automated locally?

@vinaybadgujar102
Copy link
Collaborator

No it is not working locally also. It passes once in a while but mostly fails.

@tijlleenders
Copy link
Owner Author

Ok, well at least then you have a good setup to iterate possible solutions. What's the flop-rate? Does it succeed 10% or 90% of the time? Just retrying the test twice can be a workaround for now.

@tijlleenders tijlleenders moved this from Done to In progress in ZinZen® Mar 25, 2024
@vinaybadgujar102
Copy link
Collaborator

Does it succeed 10% or 90% of the time?

10%.
I will have to go through the documentation deeply to find the solution.

@tijlleenders
Copy link
Owner Author

@vinaybadgujar102 Can we increase the time the test is allowed to run to two minutes to see if that fixes the flaky tests?

image

@tijlleenders tijlleenders changed the title Playwright test timing out seen as a PASS Playwright test timing out - flaky Jul 12, 2024
@vinaybadgujar102
Copy link
Collaborator

@tijlleenders, Will give this a shot.

@tijlleenders
Copy link
Owner Author

Closed by #2049

@github-project-automation github-project-automation bot moved this from Parking lot to Done in ZinZen® Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest
Projects
Archived in project
Development

No branches or pull requests

2 participants