[FEATURE] Speed up Cypress E2E test suite (3m31s → 58s)
- Dominant language
- TypeScript
- Stars
- 716
- Forks
- 1.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 35
Description
### Why do we need this improvement?
The Cypress E2E suite was slow due to:
1. Repeated cy.visit() calls
2. Overuse of beforeEach() for read-only tests
3. A skipped test caused by a nested it block
4. Retries enabled during local runs
### How will this change help?
1. toolspage.cy.js: Replaced beforeEach() with before() (page loaded once instead of 57 times)
~1m52s → ~1s
3. homepage.cy.js: Split navigation tests from verification tests ~47s → ~28s
5. docspage.cy.js: Fixed invalid nested it block so all tests run
6. Config:
7. Set testIsolation: false
8. Added test:e2e:fast (retries=0) for quick local feedback
### Screenshots
_No response_
### How could it be implemented/designed?
1. Reduce redundant reloads: Use before() instead of beforeEach() for read-only tests and share page state by disabling test isolation where safe.
2. Optimize test structure: Separate navigation tests from verification-only tests and avoid unnecessary external navigation (assert href instead).
### 🚧 Breaking changes
Yes
### 👀 Have you checked for similar open issues?
- [x] I checked and didn't find a similar issue
### 🏢 Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md)
### Are you willing to work on this issue?
Yes I am willing to submit a PR!
Contributor guide
Research direction
The affected entry points are toolspage.cy.js, homepage.cy.js, docspage.cy.js, and the Cypress configuration; start by running test:e2e:fast and inspecting the existing setup hooks and retry settings. Separate navigation from verification, fix the nested it block, and verify the fast command and the reported suite-time improvement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, typescript
- Domain
- performance, testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100