From b5e919ff70bdce7fc99115ae2e1e7c71f566033f Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Mon, 11 Dec 2023 11:25:47 -0500 Subject: [PATCH 1/4] adr --- docs/decisions/2023-12-11_cypress_test_isolation.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/decisions/2023-12-11_cypress_test_isolation.md diff --git a/docs/decisions/2023-12-11_cypress_test_isolation.md b/docs/decisions/2023-12-11_cypress_test_isolation.md new file mode 100644 index 0000000000..bf5635f152 --- /dev/null +++ b/docs/decisions/2023-12-11_cypress_test_isolation.md @@ -0,0 +1,13 @@ +# 2023-12-11 Cypress tests run independently by resetting browser and database state + +- 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 + +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. From 753f6e5823c610c6decfe1d7e0d112f969933658 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Mon, 11 Dec 2023 11:30:03 -0500 Subject: [PATCH 2/4] add ticket --- docs/decisions/2023-12-11_cypress_test_isolation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/decisions/2023-12-11_cypress_test_isolation.md b/docs/decisions/2023-12-11_cypress_test_isolation.md index bf5635f152..dea75b8d1d 100644 --- a/docs/decisions/2023-12-11_cypress_test_isolation.md +++ b/docs/decisions/2023-12-11_cypress_test_isolation.md @@ -1,5 +1,6 @@ # 2023-12-11 Cypress tests run independently by resetting browser and database state +- design: WRITING-14354 - status: accepted - date: 2023-6-26 - authors: SupaJoon From 2449010197f589c84c30e454163bad7f8a734514 Mon Sep 17 00:00:00 2001 From: SupaJoon Date: Tue, 12 Dec 2023 10:37:43 -0500 Subject: [PATCH 3/4] Update docs/decisions/2023-12-11_cypress_test_isolation.md Co-authored-by: Sophie Stadler --- docs/decisions/2023-12-11_cypress_test_isolation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions/2023-12-11_cypress_test_isolation.md b/docs/decisions/2023-12-11_cypress_test_isolation.md index dea75b8d1d..2a531743be 100644 --- a/docs/decisions/2023-12-11_cypress_test_isolation.md +++ b/docs/decisions/2023-12-11_cypress_test_isolation.md @@ -11,4 +11,4 @@ Cypress tests that mutate browser or Evergreen database state affected outcomes ## Decision Outcome -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. +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. From 22867a435d156487159d65e0858e48bae4a09078 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Tue, 12 Dec 2023 15:18:39 -0500 Subject: [PATCH 4/4] comment on parallelization --- docs/decisions/2023-12-11_cypress_test_isolation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/decisions/2023-12-11_cypress_test_isolation.md b/docs/decisions/2023-12-11_cypress_test_isolation.md index 2a531743be..d1e11d1b68 100644 --- a/docs/decisions/2023-12-11_cypress_test_isolation.md +++ b/docs/decisions/2023-12-11_cypress_test_isolation.md @@ -11,4 +11,4 @@ Cypress tests that mutate browser or Evergreen database state affected outcomes ## Decision Outcome -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. +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.