Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

DEVPROD-2645: ADR for Cypress test isolation #2182

Merged
merged 4 commits into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/decisions/2023-12-11_cypress_test_isolation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 2023-12-11 Cypress tests run independently by resetting browser and database state

- design: WRITING-14354
- status: accepted
- date: 2023-6-26
- authors: SupaJoon

## Context and Problem Statement

Cypress tests that mutate browser or Evergreen database state affected outcomes of tests that ran after. This prevented parallelzing tests in CI, running a subset, and thoroughly testing UI flows that mutate Evergreen data.

## Decision Outcome
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be nice to add a statement about the takeaways regarding parallelization since that's mentioned as a problem.


Cypress tests that mutate Evergreen data follow up with a database reset operation before running the next test. Also, DOM state, cookies, localStorage and sessionStorage are reset before each test. This lets tests run reliably in any order or grouping allowing for parallelization of the test suite.