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

♻️ Address slow playwright tests #12357

Closed
3 tasks
esizer opened this issue Dec 19, 2024 · 0 comments · Fixed by #12392
Closed
3 tasks

♻️ Address slow playwright tests #12357

esizer opened this issue Dec 19, 2024 · 0 comments · Fixed by #12392
Assignees
Labels
debt Refactor or improve existing code.

Comments

@esizer
Copy link
Member

esizer commented Dec 19, 2024

♻️ Debt/Refactor

We should probably address some of the slower tests in playwright.

🕵️ Details

As our test coverage expands (good thing) our run time is growing (bad thing). I think we may be doing too much in single test files. Since playwright runs our tests in parallel, writing smaller tests (with the same coverage) should help speed things up.

So, instead of trying to test a complete feature in a single test, we can still test the feature but break steps up into different tests.

🙋‍♀️ Proposed Solution

Look at the following slow tests being reported and see if breaking them up helps.

  Slow test file: [chromium] › applicant/experience.spec.ts (2.5m)
  Slow test file: [chromium] › admin/auth.spec.ts (2.3m)
  Slow test file: [chromium] › admin/pool-candidate.spec.ts (1.1m)
  Slow test file: [chromium] › admin/process-actions.spec.ts (59.9s)
  Slow test file: [chromium] › admin/admin-workflows.spec.ts (58.5s)
  Consider splitting slow test files to speed up parallel execution

Experiences

Right now we test every experience type in a single test file. I think this one should be easy, just create different test files for each experience type.

Auth

Similar with this one, we are testing every single role in a single test. We can create a test per role.

Pool candidate

I think this one is the most disjointed. Each test, while related to the candidate, are not that similar. We could have a test for:

  • snapshot
  • assessment
  • "more actions"

Process actions

This one is tricky because it is all related but, maybe we have separate files for the different crud operations? 🤔

  • create
  • update
  • delete

Admin workflows

I feel like this one is easiest, move the download test out to its own file.

✅ Acceptance Criteria

  • Long running tests are broken up
  • Coverage remains the same (or higher 😛 )
  • Improvement on run time of playwright tests
@esizer esizer added the debt Refactor or improve existing code. label Dec 19, 2024
@esizer esizer self-assigned this Dec 30, 2024
@esizer esizer moved this to 🏗 In progress in GC Digital Talent Dec 30, 2024
@esizer esizer moved this from 🏗 In progress to 👀 In review in GC Digital Talent Dec 30, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in GC Digital Talent Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Refactor or improve existing code.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant