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

Improve stability of e2e tests #5493

Open
BacLuc opened this issue Jul 7, 2024 · 4 comments
Open

Improve stability of e2e tests #5493

BacLuc opened this issue Jul 7, 2024 · 4 comments

Comments

@BacLuc
Copy link
Contributor

BacLuc commented Jul 7, 2024

Ways we could improve the stability of e2e tests

Improve the run environment

Thesis: The cypress github action is flaky, the docker images are better

Does not seem that way.

Thesis: they are flaky because they don't have enough RAM

Does not seem that way

Thesis: they are flaky because they don't have enough CPU

The feeling is that the tests would then just run longer and run into timeouts.
But this seems not the case.

Thesis: when we use the cypress retry mechanism, they will be more stable

It does not solve the problem, but renovate can merge and we can work.

Thesis: the frankenphp container stops responding

(Which leads to the connection refused for the login request errors)
-> try enable strace: https://github.com/BacLuc/ecamp3/tree/debug-frankenphp-strace
add debug log to caddy: https://github.com/BacLuc/ecamp3/tree/enable-caddy-debug

-> this seems to be confirmed.
(See https://github.com/BacLuc/ecamp3/actions/runs/10013887138 in the failing runs in the step added by this PR: #5558)
I have 3 Solutions for this problem, they are listed in these 3 posts:

Vote with a 👍 or 👎

Improve the single tests

The inspection of the test errors is in this Issue: #5322

Thesis: Not all tests are flaky

@manuelmeister
Copy link
Member

manuelmeister commented Jul 7, 2024

Thesis: they are flaky because browsers are flaky => use stable browser version
Thesis: they are flaky because Cypress is flaky => use Playwright?

@BacLuc
Copy link
Contributor Author

BacLuc commented Jul 19, 2024

Solution 1 for Thesis: "the frankenphp container stops responding"

Revert back to a classic php fpm setup

The thesis is, that the frankenphp is not yet production ready and crashes from time to time.
-> Then we should step back to the php fpm setup from before.

@BacLuc
Copy link
Contributor Author

BacLuc commented Jul 19, 2024

Solution 2 for Thesis: the frankenphp container stops responding

Use the prod frankenphp api image for the e2e tests

This seems to work (and hopefully so, we want to deploy this in prod).
Needs first #5277 (but is prepared)

Seems to work well: https://github.com/BacLuc/ecamp3/actions/runs/10014833334
But is a little complex:

still crashes, but less often: https://github.com/BacLuc/ecamp3/actions/runs/10014833334/job/27685355483

@BacLuc
Copy link
Contributor Author

BacLuc commented Jul 19, 2024

Solution 3 for Thesis: the frankenphp container stops responding

Add retries in cypress and restart the api container

This also seems to work. Firefox crashes a lot if you use a global beforeEach.
@BacLuc would like to remove firefox from the tests for now if we use this approach.

Seems to not work perfectly, but better as before (https://github.com/bacluc-test-org/ecamp3/actions/runs/9998897898):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants