Skip to content

test(site): improve E2E framework #9438

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

Merged
merged 6 commits into from
Aug 30, 2023
Merged

test(site): improve E2E framework #9438

merged 6 commits into from
Aug 30, 2023

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Aug 30, 2023

This PR adds more debugging hooks to Chromium events, so that we can intercept HTTP calls, and simply log them.

Screenshot 2023-08-30 at 17 02 32

Changes:

  • scale down number of workers to 1 (serial)
  • log API calls to Coder backend
  • log start/end of the test
  • show test name on Chromium debug lines

@mtojek mtojek self-assigned this Aug 30, 2023
@mtojek mtojek marked this pull request as ready for review August 30, 2023 15:06
@mtojek mtojek requested a review from BrunoQuaresma August 30, 2023 15:06
@mtojek
Copy link
Member Author

mtojek commented Aug 30, 2023

@BrunoQuaresma Do you have an idea why is npm failing here? I can see occurrences like this:

e2e/tests/app.spec.ts(6,43): error TS2304: Cannot find name 'beforeCoderTest'.

EDIT:

Oh it looks like I forgot to commit this file...

@@ -554,7 +554,7 @@ jobs:
- run: pnpm playwright:install
working-directory: site

- run: pnpm playwright:test
- run: pnpm playwright:test --workers 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we setting workers to 1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you delete this, playwright will run tests in parallel, and it may cause the Coder backend overloaded.

I want to reduce the amount of points that can break e2e tests. Additionally, our e2e tests are relatively quick, so if it isn't a problem I would disable parallelism for now.

Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition

@mtojek mtojek enabled auto-merge (squash) August 30, 2023 15:27
@mtojek mtojek merged commit 2377ab6 into main Aug 30, 2023
@mtojek mtojek deleted the e2e-cleanup branch August 30, 2023 15:34
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants