Skip to content

[FEATURE] Speed up Cypress E2E test suite (3m31s β†’ 58s)Β #4881

@Sourya07

Description

@Sourya07

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
  2. homepage.cy.js: Split navigation tests from verification tests ~47s β†’ ~28s
  3. docspage.cy.js: Fixed invalid nested it block so all tests run
  4. Config:
  5. Set testIsolation: false
  6. 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?

  • I checked and didn't find a similar issue

🏒 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To Be Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions