[8.x] [Detection Engine] Cypress cleanup and simplification (#217276)#218166
Merged
kibanamachine merged 1 commit intoelastic:8.xfrom Apr 14, 2025
Merged
[8.x] [Detection Engine] Cypress cleanup and simplification (#217276)#218166kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine merged 1 commit intoelastic:8.xfrom
Conversation
## 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)
Contributor
💚 Build Succeeded
Metrics [docs]
cc @yctercero |
rylnd
added a commit
that referenced
this pull request
May 30, 2025
…#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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.x:Questions ?
Please refer to the Backport tool documentation