Skip to content

[8.x] [Detection Engine] Cypress cleanup and simplification (#217276)#218166

Merged
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-217276
Apr 14, 2025
Merged

[8.x] [Detection Engine] Cypress cleanup and simplification (#217276)#218166
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-217276

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## 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)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Apr 14, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) April 14, 2025 18:53
@kibanamachine kibanamachine merged commit 8ab1f41 into elastic:8.x Apr 14, 2025
11 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants