Skip to content

Commit a2f6285

Browse files
[9.0] [Security Solution] Test plan for prebuilt rule upgrade notifications (#212817) (#213717)
# Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution] Test plan for prebuilt rule upgrade notifications (#212817)](#212817) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Georgii Gorbachev","email":"georgii.gorbachev@elastic.co"},"sourceCommit":{"committedDate":"2025-03-10T11:50:12Z","message":"[Security Solution] Test plan for prebuilt rule upgrade notifications (#212817)\n\n**Epic:** https://github.com/elastic/kibana/issues/174168\n**Partially addresses:**\nhttps://github.com//issues/202078,\nhttps://github.com//issues/210358\n\n## Summary\n\nWe started to rework and introduce functional changes to our existing\ntest plans for prebuilt rule customization, upgrade, and export/import\nworkflows.\n\nSpecifically, this PR:\n\n- Creates a new test plan for prebuilt rule upgrade notifications on the\nRule Management, Rule Details, and Rule Editing pages. The filename is\n`prebuilt_rule_upgrade_notifications.md`.\n- Extracts the existing scenarios for upgrade notifications on the Rule\nManagement page from `prebuilt_rule_upgrade_without_preview.md` to\n`prebuilt_rule_upgrade_notifications.md`. Also, updates them according\nto the most recent UI behavior.\n- Adds new scenarios for upgrade notifications on the Rule Details page\nto `prebuilt_rule_upgrade_notifications.md`.\n- Adds new scenarios for upgrade notifications on the Rule Editing page\nto `prebuilt_rule_upgrade_notifications.md`.\n\nThe new test plan should be in line with the changes discussed in\nhttps://github.com//issues/210358.","sha":"da0480bde922b82741240a2aeeb1c33bd2497c66","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","test-plan","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security Solution] Test plan for prebuilt rule upgrade notifications","number":212817,"url":"https://github.com/elastic/kibana/pull/212817","mergeCommit":{"message":"[Security Solution] Test plan for prebuilt rule upgrade notifications (#212817)\n\n**Epic:** https://github.com/elastic/kibana/issues/174168\n**Partially addresses:**\nhttps://github.com//issues/202078,\nhttps://github.com//issues/210358\n\n## Summary\n\nWe started to rework and introduce functional changes to our existing\ntest plans for prebuilt rule customization, upgrade, and export/import\nworkflows.\n\nSpecifically, this PR:\n\n- Creates a new test plan for prebuilt rule upgrade notifications on the\nRule Management, Rule Details, and Rule Editing pages. The filename is\n`prebuilt_rule_upgrade_notifications.md`.\n- Extracts the existing scenarios for upgrade notifications on the Rule\nManagement page from `prebuilt_rule_upgrade_without_preview.md` to\n`prebuilt_rule_upgrade_notifications.md`. Also, updates them according\nto the most recent UI behavior.\n- Adds new scenarios for upgrade notifications on the Rule Details page\nto `prebuilt_rule_upgrade_notifications.md`.\n- Adds new scenarios for upgrade notifications on the Rule Editing page\nto `prebuilt_rule_upgrade_notifications.md`.\n\nThe new test plan should be in line with the changes discussed in\nhttps://github.com//issues/210358.","sha":"da0480bde922b82741240a2aeeb1c33bd2497c66"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212817","number":212817,"mergeCommit":{"message":"[Security Solution] Test plan for prebuilt rule upgrade notifications (#212817)\n\n**Epic:** https://github.com/elastic/kibana/issues/174168\n**Partially addresses:**\nhttps://github.com//issues/202078,\nhttps://github.com//issues/210358\n\n## Summary\n\nWe started to rework and introduce functional changes to our existing\ntest plans for prebuilt rule customization, upgrade, and export/import\nworkflows.\n\nSpecifically, this PR:\n\n- Creates a new test plan for prebuilt rule upgrade notifications on the\nRule Management, Rule Details, and Rule Editing pages. The filename is\n`prebuilt_rule_upgrade_notifications.md`.\n- Extracts the existing scenarios for upgrade notifications on the Rule\nManagement page from `prebuilt_rule_upgrade_without_preview.md` to\n`prebuilt_rule_upgrade_notifications.md`. Also, updates them according\nto the most recent UI behavior.\n- Adds new scenarios for upgrade notifications on the Rule Details page\nto `prebuilt_rule_upgrade_notifications.md`.\n- Adds new scenarios for upgrade notifications on the Rule Editing page\nto `prebuilt_rule_upgrade_notifications.md`.\n\nThe new test plan should be in line with the changes discussed in\nhttps://github.com//issues/210358.","sha":"da0480bde922b82741240a2aeeb1c33bd2497c66"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
1 parent e3b7db6 commit a2f6285

3 files changed

Lines changed: 334 additions & 60 deletions

File tree

Lines changed: 333 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,333 @@
1+
# Test plan: prebuilt rule upgrade notifications <!-- omit from toc -->
2+
3+
**Status**: `in progress`, matches [Milestone 3](https://github.com/elastic/kibana/issues/174168).
4+
5+
> [!TIP]
6+
> If you're new to prebuilt rules, get started [here](./prebuilt_rules.md) and check an overview of the features of prebuilt rules in [this section](./prebuilt_rules_common_info.md#features).
7+
8+
## Summary <!-- omit from toc -->
9+
10+
This is a test plan for the functionality of showing notifications about:
11+
12+
- Rule Management page: some of the currently installed prebuilt rules can be upgraded to new versions.
13+
- Rule Details page: the rule shown on this page can be upgraded to a new version.
14+
- Rule Editing page: the rule shown on this page can be upgraded to a new version.
15+
16+
## Table of contents <!-- omit from toc -->
17+
18+
<!--
19+
Please use the "Markdown All in One" VS Code extension to keep the TOC in sync with the text:
20+
https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
21+
-->
22+
23+
- [Useful information](#useful-information)
24+
- [Tickets](#tickets)
25+
- [Terminology](#terminology)
26+
- [Requirements](#requirements)
27+
- [Assumptions](#assumptions)
28+
- [Technical requirements](#technical-requirements)
29+
- [Product requirements](#product-requirements)
30+
- [Scenarios](#scenarios)
31+
- [Rule upgrade notifications on the Rule Management page](#rule-upgrade-notifications-on-the-rule-management-page)
32+
- [**Scenario: User is NOT notified on the Rule Management page when no prebuilt rules are installed**](#scenario-user-is-not-notified-on-the-rule-management-page-when-no-prebuilt-rules-are-installed)
33+
- [**Scenario: User is NOT notified on the Rule Management page when all installed prebuilt rules are up to date**](#scenario-user-is-not-notified-on-the-rule-management-page-when-all-installed-prebuilt-rules-are-up-to-date)
34+
- [**Scenario: User is NOT notified on the Rule Management page until the package installation is completed**](#scenario-user-is-not-notified-on-the-rule-management-page-until-the-package-installation-is-completed)
35+
- [**Scenario: User is notified on the Rule Management page when there are some prebuilt rules to upgrade but there are no more prebuilt rules to install**](#scenario-user-is-notified-on-the-rule-management-page-when-there-are-some-prebuilt-rules-to-upgrade-but-there-are-no-more-prebuilt-rules-to-install)
36+
- [**Scenario: User is notified on the Rule Management page when there are some prebuilt rules to upgrade and some more prebuilt rules to install**](#scenario-user-is-notified-on-the-rule-management-page-when-there-are-some-prebuilt-rules-to-upgrade-and-some-more-prebuilt-rules-to-install)
37+
- [**Scenario: User can open the Rule Upgrade table on the Rule Management page**](#scenario-user-can-open-the-rule-upgrade-table-on-the-rule-management-page)
38+
- [**Scenario: User can dismiss the prebuilt rule upgrade callout on the Rule Management page**](#scenario-user-can-dismiss-the-prebuilt-rule-upgrade-callout-on-the-rule-management-page)
39+
- [Rule upgrade notifications on the Rule Details page](#rule-upgrade-notifications-on-the-rule-details-page)
40+
- [**Scenario: User is NOT notified on the Rule Details page when the rule is up to date**](#scenario-user-is-not-notified-on-the-rule-details-page-when-the-rule-is-up-to-date)
41+
- [**Scenario: User is notified on the Rule Details page when the rule is outdated and can be upgraded to a new version**](#scenario-user-is-notified-on-the-rule-details-page-when-the-rule-is-outdated-and-can-be-upgraded-to-a-new-version)
42+
- [**Scenario: User can open the Rule Upgrade flyout on the Rule Details page**](#scenario-user-can-open-the-rule-upgrade-flyout-on-the-rule-details-page)
43+
- [**Scenario: User cannot dismiss the prebuilt rule upgrade callout on the Rule Details page**](#scenario-user-cannot-dismiss-the-prebuilt-rule-upgrade-callout-on-the-rule-details-page)
44+
- [Rule upgrade notifications on the Rule Editing page](#rule-upgrade-notifications-on-the-rule-editing-page)
45+
- [**Scenario: User is NOT notified on the Rule Editing page when the rule is up to date**](#scenario-user-is-not-notified-on-the-rule-editing-page-when-the-rule-is-up-to-date)
46+
- [**Scenario: User is notified on the Rule Editing page when the rule is outdated and can be upgraded to a new version**](#scenario-user-is-notified-on-the-rule-editing-page-when-the-rule-is-outdated-and-can-be-upgraded-to-a-new-version)
47+
- [**Scenario: User can navigate from the Rule Editing page to the Rule Details page in order to upgrade the rule**](#scenario-user-can-navigate-from-the-rule-editing-page-to-the-rule-details-page-in-order-to-upgrade-the-rule)
48+
- [**Scenario: User cannot dismiss the prebuilt rule upgrade callout on the Rule Editing page**](#scenario-user-cannot-dismiss-the-prebuilt-rule-upgrade-callout-on-the-rule-editing-page)
49+
50+
## Useful information
51+
52+
### Tickets
53+
54+
- [Users can Customize Prebuilt Detection Rules](https://github.com/elastic/security-team/issues/1974) (internal)
55+
- [Users can Customize Prebuilt Detection Rules: Milestone 3](https://github.com/elastic/kibana/issues/174168)
56+
- [Tests for prebuilt rule upgrade workflow](https://github.com/elastic/kibana/issues/202078)
57+
58+
### Terminology
59+
60+
- [Common terminology](./prebuilt_rules_common_info.md#common-terminology).
61+
- **Callout to upgrade prebuilt rules**: a notification callout shown on the Rule Management page that encourages the user to keep prebuilt rules up-to-date and regularly upgrade them to their latest versions.
62+
- **Callout to upgrade the rule**: is either of the two callouts, depending on the context of a given scenario:
63+
- a notification callout shown on the Rule Details page that encourages the user to upgrade the rule to its latest version;
64+
- a notification callout shown on the Rule Editing page that encourages the user to upgrade the rule to its latest version before editing it.
65+
66+
## Requirements
67+
68+
### Assumptions
69+
70+
Assumptions about test environments and scenarios outlined in this test plan.
71+
72+
- [Common assumptions](./prebuilt_rules_common_info.md#common-assumptions).
73+
74+
### Technical requirements
75+
76+
Non-functional requirements for the functionality outlined in this test plan.
77+
78+
- [Common technical requirements](./prebuilt_rules_common_info.md#common-technical-requirements).
79+
80+
### Product requirements
81+
82+
Functional requirements for the functionality outlined in this test plan.
83+
84+
- [Common product requirements](./prebuilt_rules_common_info.md#common-product-requirements).
85+
86+
User stories for the Rule Management page:
87+
88+
- User can see a notification callout on the Rule Management page when some of the currently installed prebuilt rules can be upgraded to new versions. The callout encourages the user to keep prebuilt rules up-to-date and regularly upgrade them to their latest versions.
89+
- User can dismiss the callout.
90+
- User can see a Rule Updates tab on the Rule Management page when some of the currently installed prebuilt rules can be upgraded to new versions.
91+
- User can see the total number of rules available for upgrade on this tab.
92+
- User can click on the tab which opens the Rule Upgrade table.
93+
94+
User stories for the Rule Details page:
95+
96+
- User can see a notification callout on the Rule Details page when the rule shown on this page can be upgraded to a new version. The callout encourages the user to upgrade the rule.
97+
- User can open a Rule Upgrade flyout to review updates in the latest rule version and perform the upgrade.
98+
- User can't dismiss the callout.
99+
100+
User stories for the Rule Editing page:
101+
102+
- User can see a notification callout on the Rule Editing page when the rule shown on this page can be upgraded to a new version. The callout encourages the user to upgrade the rule before editing it.
103+
- User can navigate back to the Rule Details page where they can review updates in the latest rule version and perform the upgrade.
104+
- User can't dismiss the callout.
105+
106+
## Scenarios
107+
108+
### Rule upgrade notifications on the Rule Management page
109+
110+
#### **Scenario: User is NOT notified on the Rule Management page when no prebuilt rules are installed**
111+
112+
**Automation**: 1 e2e test with mock rules + 1 integration test with mock rules for the /status endpoint.
113+
114+
```Gherkin
115+
Given no prebuilt rules are installed in Kibana
116+
When user opens the Rule Management page
117+
Then user should NOT see a callout to upgrade prebuilt rules
118+
And user should NOT see a Rule Updates tab
119+
And user should NOT see a number of rules available to upgrade
120+
```
121+
122+
#### **Scenario: User is NOT notified on the Rule Management page when all installed prebuilt rules are up to date**
123+
124+
**Automation**: 1 e2e test with mock rules + 1 integration test with mock rules for the /status endpoint.
125+
126+
```Gherkin
127+
Given <X> prebuilt rules are installed in Kibana
128+
And all of them are up to date (no new versions are available)
129+
When user opens the Rule Management page
130+
Then user should NOT see a callout to upgrade prebuilt rules
131+
And user should NOT see a Rule Updates tab
132+
And user should NOT see a number of rules available to upgrade
133+
134+
Examples:
135+
| X |
136+
| 1 |
137+
| 100 |
138+
| 1250 |
139+
```
140+
141+
#### **Scenario: User is NOT notified on the Rule Management page until the package installation is completed**
142+
143+
**Automation**: 1 e2e test with mock rules + unit tests.
144+
145+
```Gherkin
146+
Given <X> prebuilt rules are installed in Kibana
147+
And for <Z> of the installed rules there are new versions available
148+
And prebuilt rules package is not installed
149+
When user opens the Rule Management page
150+
Then user should NOT see a callout to upgrade prebuilt rules
151+
And user should NOT see a Rule Updates tab
152+
And user should NOT see a number of rules available to upgrade
153+
When user waits until the the package installation is completed
154+
Then user should see the callout to upgrade prebuilt rules
155+
And user should see the Rule Updates tab
156+
And user should see the number of rules available to upgrade (<Z>)
157+
158+
Examples:
159+
| X | Z |
160+
| 1250 | 1 |
161+
| 1250 | 100 |
162+
| 1250 | 1250 |
163+
```
164+
165+
#### **Scenario: User is notified on the Rule Management page when there are some prebuilt rules to upgrade but there are no more prebuilt rules to install**
166+
167+
**Automation**: 1 e2e test with mock rules + 1 integration test with mock rules for the /status endpoint.
168+
169+
```Gherkin
170+
Given <X> prebuilt rules are installed in Kibana
171+
And there are no more prebuilt rules available to install
172+
And for <Z> of the installed rules there are new versions available
173+
When user opens the Rule Management page
174+
Then user should see the callout to upgrade prebuilt rules
175+
And user should see the Rule Updates tab
176+
And user should see the number of rules available to upgrade (<Z>)
177+
178+
Examples:
179+
| X | Z |
180+
| 1250 | 1 |
181+
| 1250 | 100 |
182+
| 1250 | 1250 |
183+
```
184+
185+
#### **Scenario: User is notified on the Rule Management page when there are some prebuilt rules to upgrade and some more prebuilt rules to install**
186+
187+
**Automation**: 1 e2e test with mock rules + 1 integration test with mock rules for the /status endpoint.
188+
189+
```Gherkin
190+
Given <X> prebuilt rules are installed in Kibana
191+
And there are <Y> more prebuilt rules available to install
192+
And for <Z> of the installed rules there are new versions available
193+
When user opens the Rule Management page
194+
Then user should see the callout to upgrade prebuilt rules
195+
And user should see the Rule Updates tab
196+
And user should see the number of rules available to upgrade (<Z>)
197+
198+
Examples:
199+
| X | Y | Z |
200+
| 1 | 1249 | 1 |
201+
| 1249 | 1 | 100 |
202+
| 1249 | 1 | 1249 |
203+
```
204+
205+
#### **Scenario: User can open the Rule Upgrade table on the Rule Management page**
206+
207+
**Automation**: 1 e2e test with mock rules.
208+
209+
```Gherkin
210+
Given some prebuilt rules are installed in Kibana
211+
And for some of the installed rules there are new versions available
212+
When user opens the Rule Management page
213+
Then user should see the Rule Updates tab
214+
When user clicks on the Rule Updates tab
215+
Then the Rule Upgrade table should be displayed
216+
```
217+
218+
#### **Scenario: User can dismiss the prebuilt rule upgrade callout on the Rule Management page**
219+
220+
Currently, we store the callout's state only in the browser memory. This means that a dismissed callout will show up again after the page refresh.
221+
222+
**Automation**: 1 e2e test with mock rules + unit tests for the callout component.
223+
224+
```Gherkin
225+
Given some prebuilt rules are installed in Kibana
226+
And for some of the installed rules there are new versions available
227+
When user opens the Rule Management page
228+
Then user should see the callout to upgrade prebuilt rules
229+
When user clicks on the Dismiss button
230+
Then the callout should disappear
231+
When user refreshes the page
232+
Then the callout should appear again
233+
```
234+
235+
### Rule upgrade notifications on the Rule Details page
236+
237+
#### **Scenario: User is NOT notified on the Rule Details page when the rule is up to date**
238+
239+
**Automation**: 1 e2e test with mock rules.
240+
241+
```Gherkin
242+
Given a prebuilt rule is installed in Kibana
243+
And the rule is up to date (no new versions are available for this rule)
244+
When user opens the Rule Details page
245+
Then user should NOT see the callout to upgrade the rule
246+
```
247+
248+
#### **Scenario: User is notified on the Rule Details page when the rule is outdated and can be upgraded to a new version**
249+
250+
**Automation**: 1 e2e test with mock rules.
251+
252+
```Gherkin
253+
Given a prebuilt rule is installed in Kibana
254+
And the rule is outdated (a new version is available for this rule)
255+
When user opens the Rule Details page
256+
Then user should see the callout to upgrade the rule
257+
```
258+
259+
#### **Scenario: User can open the Rule Upgrade flyout on the Rule Details page**
260+
261+
**Automation**: 1 e2e test with mock rules.
262+
263+
```Gherkin
264+
Given a prebuilt rule is installed in Kibana
265+
And the rule is outdated (a new version is available for this rule)
266+
When user opens the Rule Details page
267+
Then user should see the callout to upgrade the rule
268+
When user clicks on the callout's CTA button
269+
Then the Rule Upgrade flyout should be displayed
270+
```
271+
272+
#### **Scenario: User cannot dismiss the prebuilt rule upgrade callout on the Rule Details page**
273+
274+
**Automation**: unit tests for the callout component.
275+
276+
```Gherkin
277+
Given a prebuilt rule is installed in Kibana
278+
And the rule is outdated (a new version is available for this rule)
279+
When user opens the Rule Details page
280+
Then user should see the callout to upgrade the rule
281+
And user should NOT see any Dismiss buttons in it
282+
And user should NOT be able to dismiss it
283+
```
284+
285+
### Rule upgrade notifications on the Rule Editing page
286+
287+
#### **Scenario: User is NOT notified on the Rule Editing page when the rule is up to date**
288+
289+
**Automation**: 1 e2e test with mock rules.
290+
291+
```Gherkin
292+
Given a prebuilt rule is installed in Kibana
293+
And the rule is up to date (no new versions are available for this rule)
294+
When user opens the Rule Editing page
295+
Then user should NOT see the callout to upgrade the rule
296+
```
297+
298+
#### **Scenario: User is notified on the Rule Editing page when the rule is outdated and can be upgraded to a new version**
299+
300+
**Automation**: 1 e2e test with mock rules.
301+
302+
```Gherkin
303+
Given a prebuilt rule is installed in Kibana
304+
And the rule is outdated (a new version is available for this rule)
305+
When user opens the Rule Editing page
306+
Then user should see the callout to upgrade the rule
307+
```
308+
309+
#### **Scenario: User can navigate from the Rule Editing page to the Rule Details page in order to upgrade the rule**
310+
311+
**Automation**: 1 e2e test with mock rules.
312+
313+
```Gherkin
314+
Given a prebuilt rule is installed in Kibana
315+
And the rule is outdated (a new version is available for this rule)
316+
When user opens the Rule Editing page
317+
Then user should see the callout to upgrade the rule
318+
When user clicks on the callout's CTA button
319+
Then user should be navigated to the Rule Details page
320+
```
321+
322+
#### **Scenario: User cannot dismiss the prebuilt rule upgrade callout on the Rule Editing page**
323+
324+
**Automation**: unit tests for the callout component.
325+
326+
```Gherkin
327+
Given a prebuilt rule is installed in Kibana
328+
And the rule is outdated (a new version is available for this rule)
329+
When user opens the Rule Editing page
330+
Then user should see the callout to upgrade the rule
331+
And user should NOT see any Dismiss buttons in it
332+
And user should NOT be able to dismiss it
333+
```

0 commit comments

Comments
 (0)