[Detection Engine] Cypress cleanup and simplification#217276
[Detection Engine] Cypress cleanup and simplification#217276yctercero merged 7 commits intoelastic:mainfrom
Conversation
|
/ci |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#8159[✅] Security Solution Detection Engine - Cypress: 25/25 tests passed. |
|
Pinging @elastic/security-detection-engine (Team:Detection Engine) |
💚 Build Succeeded
Metrics [docs]
History
cc @yctercero |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/14453309861 |
## Summary This PR attempts to simplify our Cypress tests to focus in on what exactly we want a test to be doing. Many of our rule creation cypress tests were testing rule creation, rule edit, rule details and more. This results in a lot of flake and us triaging tests that often test things other than what we're ultimately trying to answer. I tried to simplify it so the rule specific tests simply answer - can we create this rule type in the UI? Then there's a single test for checking the entire flow of create rule -> rule details and check for alerts. The FTRs should be ensuring that the rules generate alerts as expected so we don't need to check this for every rule type in cypress. I also moved alert suppression into it's own folder as there is a lot of specific logic to test around that. (cherry picked from commit 81c93ca)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#218166) # Backport This will backport the following commits from `main` to `8.x`: - [[Detection Engine] Cypress cleanup and simplification (#217276)](#217276) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Yara Tercero","email":"yctercero@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-14T18:46:47Z","message":"[Detection Engine] Cypress cleanup and simplification (#217276)\n\n## Summary\n\nThis PR attempts to simplify our Cypress tests to focus in on what\nexactly we want a test to be doing. Many of our rule creation cypress\ntests were testing rule creation, rule edit, rule details and more. This\nresults in a lot of flake and us triaging tests that often test things\nother than what we're ultimately trying to answer.\n\nI tried to simplify it so the rule specific tests simply answer - can we\ncreate this rule type in the UI? Then there's a single test for checking\nthe entire flow of create rule -> rule details and check for alerts. The\nFTRs should be ensuring that the rules generate alerts as expected so we\ndon't need to check this for every rule type in cypress.\n\nI also moved alert suppression into it's own folder as there is a lot of\nspecific logic to test around that.","sha":"81c93ca5d1dd714297b04ff80660fbdb6a267582","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detection Engine","backport:version","v9.1.0","v8.19.0"],"title":"[Detection Engine] Cypress cleanup and simplification","number":217276,"url":"https://github.com/elastic/kibana/pull/217276","mergeCommit":{"message":"[Detection Engine] Cypress cleanup and simplification (#217276)\n\n## Summary\n\nThis PR attempts to simplify our Cypress tests to focus in on what\nexactly we want a test to be doing. Many of our rule creation cypress\ntests were testing rule creation, rule edit, rule details and more. This\nresults in a lot of flake and us triaging tests that often test things\nother than what we're ultimately trying to answer.\n\nI tried to simplify it so the rule specific tests simply answer - can we\ncreate this rule type in the UI? Then there's a single test for checking\nthe entire flow of create rule -> rule details and check for alerts. The\nFTRs should be ensuring that the rules generate alerts as expected so we\ndon't need to check this for every rule type in cypress.\n\nI also moved alert suppression into it's own folder as there is a lot of\nspecific logic to test around that.","sha":"81c93ca5d1dd714297b04ff80660fbdb6a267582"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217276","number":217276,"mergeCommit":{"message":"[Detection Engine] Cypress cleanup and simplification (#217276)\n\n## Summary\n\nThis PR attempts to simplify our Cypress tests to focus in on what\nexactly we want a test to be doing. Many of our rule creation cypress\ntests were testing rule creation, rule edit, rule details and more. This\nresults in a lot of flake and us triaging tests that often test things\nother than what we're ultimately trying to answer.\n\nI tried to simplify it so the rule specific tests simply answer - can we\ncreate this rule type in the UI? Then there's a single test for checking\nthe entire flow of create rule -> rule details and check for alerts. The\nFTRs should be ensuring that the rules generate alerts as expected so we\ndon't need to check this for every rule type in cypress.\n\nI also moved alert suppression into it's own folder as there is a lot of\nspecific logic to test around that.","sha":"81c93ca5d1dd714297b04ff80660fbdb6a267582"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
## Summary This PR attempts to simplify our Cypress tests to focus in on what exactly we want a test to be doing. Many of our rule creation cypress tests were testing rule creation, rule edit, rule details and more. This results in a lot of flake and us triaging tests that often test things other than what we're ultimately trying to answer. I tried to simplify it so the rule specific tests simply answer - can we create this rule type in the UI? Then there's a single test for checking the entire flow of create rule -> rule details and check for alerts. The FTRs should be ensuring that the rules generate alerts as expected so we don't need to check this for every rule type in cypress. I also moved alert suppression into it's own folder as there is a lot of specific logic to test around that. (cherry picked from commit 81c93ca) # Conflicts: # x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression_ess_basic.cy.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#221991) # Backport This will backport the following commits from `main` to `9.0`: - [[Detection Engine] Cypress cleanup and simplification (#217276)](#217276) <!--- Backport version: 10.0.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Yara Tercero","email":"yctercero@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-14T18:46:47Z","message":"[Detection Engine] Cypress cleanup and simplification (#217276)\n\n## Summary\n\nThis PR attempts to simplify our Cypress tests to focus in on what\nexactly we want a test to be doing. Many of our rule creation cypress\ntests were testing rule creation, rule edit, rule details and more. This\nresults in a lot of flake and us triaging tests that often test things\nother than what we're ultimately trying to answer.\n\nI tried to simplify it so the rule specific tests simply answer - can we\ncreate this rule type in the UI? Then there's a single test for checking\nthe entire flow of create rule -> rule details and check for alerts. The\nFTRs should be ensuring that the rules generate alerts as expected so we\ndon't need to check this for every rule type in cypress.\n\nI also moved alert suppression into it's own folder as there is a lot of\nspecific logic to test around that.","sha":"81c93ca5d1dd714297b04ff80660fbdb6a267582","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detection Engine","backport:version","v9.1.0","v8.19.0"],"title":"[Detection Engine] Cypress cleanup and simplification","number":217276,"url":"https://github.com/elastic/kibana/pull/217276","mergeCommit":{"message":"[Detection Engine] Cypress cleanup and simplification (#217276)\n\n## Summary\n\nThis PR attempts to simplify our Cypress tests to focus in on what\nexactly we want a test to be doing. Many of our rule creation cypress\ntests were testing rule creation, rule edit, rule details and more. This\nresults in a lot of flake and us triaging tests that often test things\nother than what we're ultimately trying to answer.\n\nI tried to simplify it so the rule specific tests simply answer - can we\ncreate this rule type in the UI? Then there's a single test for checking\nthe entire flow of create rule -> rule details and check for alerts. The\nFTRs should be ensuring that the rules generate alerts as expected so we\ndon't need to check this for every rule type in cypress.\n\nI also moved alert suppression into it's own folder as there is a lot of\nspecific logic to test around that.","sha":"81c93ca5d1dd714297b04ff80660fbdb6a267582"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217276","number":217276,"mergeCommit":{"message":"[Detection Engine] Cypress cleanup and simplification (#217276)\n\n## Summary\n\nThis PR attempts to simplify our Cypress tests to focus in on what\nexactly we want a test to be doing. Many of our rule creation cypress\ntests were testing rule creation, rule edit, rule details and more. This\nresults in a lot of flake and us triaging tests that often test things\nother than what we're ultimately trying to answer.\n\nI tried to simplify it so the rule specific tests simply answer - can we\ncreate this rule type in the UI? Then there's a single test for checking\nthe entire flow of create rule -> rule details and check for alerts. The\nFTRs should be ensuring that the rules generate alerts as expected so we\ndon't need to check this for every rule type in cypress.\n\nI also moved alert suppression into it's own folder as there is a lot of\nspecific logic to test around that.","sha":"81c93ca5d1dd714297b04ff80660fbdb6a267582"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/218166","number":218166,"state":"MERGED","mergeCommit":{"sha":"8ab1f4101a8d148c41f368762328cbfe098bc7b3","message":"[8.x] [Detection Engine] Cypress cleanup and simplification (#217276) (#218166)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [[Detection Engine] Cypress cleanup and simplification\n(#217276)](https://github.com/elastic/kibana/pull/217276)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Yara Tercero <yctercero@users.noreply.github.com>"}}]}] BACKPORT--> --------- Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
|
This PR didn't make it into the latest 9.0.2 BC. Updating the labels. |
Summary
This PR attempts to simplify our Cypress tests to focus in on what exactly we want a test to be doing. Many of our rule creation cypress tests were testing rule creation, rule edit, rule details and more. This results in a lot of flake and us triaging tests that often test things other than what we're ultimately trying to answer.
I tried to simplify it so the rule specific tests simply answer - can we create this rule type in the UI? Then there's a single test for checking the entire flow of create rule -> rule details and check for alerts. The FTRs should be ensuring that the rules generate alerts as expected so we don't need to check this for every rule type in cypress.
I also moved alert suppression into it's own folder as there is a lot of specific logic to test around that.
Ran on flakey test runner - https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8159