[Security Solution] Prebuilt rule deprecation workflow automated tests#263662
Conversation
Catch flakiness early (recommended)Recommended before merge: run the flaky test runner against this PR to catch flakiness early. Trigger a run with the Flaky Test Runner UI or post this comment on the PR: This check is experimental. Share your feedback in the #appex-qa channel. Posted via Macroscope — Flaky Test Runner nudge |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#11680[✅] x-pack/solutions/security/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/common/configs/serverless_essentials_tier.config.ts: 25/25 tests passed. |
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
| }); | ||
| }); | ||
|
|
||
| describe('With ids filter', () => { |
There was a problem hiding this comment.
I noticed a small inconsistency with the test plan.
Given a non-existent rule SO id
When the user requests the deprecation review filtered to the non-existent id
Then the response contains an empty rules arrayThis would actually return a 400 with
{"message":"No rules found for bulk get","status_code":400}
You can repro by using "Copy as Fetch" in Network tab on a real request, then updating the id in the request.
There was a problem hiding this comment.
Yeah I had meant to delete this, the behavior in the test plan is wrong. I've switched it over to the 400 error instead and added a specific test that lines up with the pattern we have in the endpoint
There was a problem hiding this comment.
For Cypress tests, I think it'd be a good idea to assert that success toasts appear after delete / duplicate+delete. This would give us reasonable confidence that operations actually succeeded.
|
Noticed that tests for count in the bootstrap endpoint are missing. Do we want to add them? |
| }); | ||
| }); | ||
|
|
||
| it('deletes a deprecated rule from its details page and navigates back to the rules list', () => { |
There was a problem hiding this comment.
nit: If delete fails, we still navigate to the rules list. Should stay on the same page, imo.
|
Hey, @dplumlee! I reviewed, left a few suggestions / questions. |
Added one in 00c7fbf |
Follow-up: catch flakiness early for new cypress testsFollow-up to the previous flaky test runner nudge, covering the new cypress specs added since then. Trigger a run with the 一laky Test Runner UI or post this comment on the PR: Covers the two new ESS cypress specs under Share feedback in the #appex-qa channel. Posted via Macroscope — Flaky Test Runner nudge |
nikitaindik
left a comment
There was a problem hiding this comment.
Thanks for addressing my feedback, @dplumlee! Coverage LGTM now.
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/24796786997 |
💚 Build Succeeded
Metrics [docs]
History
cc @dplumlee |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…d tests (#263662) (#265134) # Backport This will backport the following commits from `main` to `9.4`: - [[Security Solution] Prebuilt rule deprecation workflow automated tests (#263662)](#263662) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Davis Plumlee","email":"56367316+dplumlee@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-22T18:55:44Z","message":"[Security Solution] Prebuilt rule deprecation workflow automated tests (#263662)\n\n## Summary\n\nAdds unit tests, FTR integration tests, and cypress e2e tests for the\n[prebuilt rule deprecation workflow\nfeature](#259673) in accordance to\nthe [test plan](https://github.com/elastic/kibana/pull/259855)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed","sha":"50dec3989903fc92c789332ae72e22d93d09771b","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v9.4.0","v9.5.0"],"title":"[Security Solution] Prebuilt rule deprecation workflow automated tests","number":263662,"url":"https://github.com/elastic/kibana/pull/263662","mergeCommit":{"message":"[Security Solution] Prebuilt rule deprecation workflow automated tests (#263662)\n\n## Summary\n\nAdds unit tests, FTR integration tests, and cypress e2e tests for the\n[prebuilt rule deprecation workflow\nfeature](#259673) in accordance to\nthe [test plan](https://github.com/elastic/kibana/pull/259855)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed","sha":"50dec3989903fc92c789332ae72e22d93d09771b"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/263662","number":263662,"mergeCommit":{"message":"[Security Solution] Prebuilt rule deprecation workflow automated tests (#263662)\n\n## Summary\n\nAdds unit tests, FTR integration tests, and cypress e2e tests for the\n[prebuilt rule deprecation workflow\nfeature](#259673) in accordance to\nthe [test plan](https://github.com/elastic/kibana/pull/259855)\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed","sha":"50dec3989903fc92c789332ae72e22d93d09771b"}}]}] BACKPORT--> Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com>
elastic#263662) ## Summary Adds unit tests, FTR integration tests, and cypress e2e tests for the [prebuilt rule deprecation workflow feature](elastic#259673) in accordance to the [test plan](elastic#259855) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed
elastic#263662) ## Summary Adds unit tests, FTR integration tests, and cypress e2e tests for the [prebuilt rule deprecation workflow feature](elastic#259673) in accordance to the [test plan](elastic#259855) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed
elastic#263662) ## Summary Adds unit tests, FTR integration tests, and cypress e2e tests for the [prebuilt rule deprecation workflow feature](elastic#259673) in accordance to the [test plan](elastic#259855) ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed
Summary
Adds unit tests, FTR integration tests, and cypress e2e tests for the prebuilt rule deprecation workflow feature in accordance to the test plan
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.