Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution][Threat Hunting] - Unskip threat hunting tests #195662

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

michaelolo24
Copy link
Contributor

@michaelolo24 michaelolo24 commented Oct 9, 2024

  1. Added cypress-network-idle to better wait for a full page load as a loading indicator flicker could cause flakiness.

  2. List of addressed open issues:

Resolves #191819
Resolves #178367
Resolves #176757
Resolves #176759
Resolves #176758
Resolves #193840
Resolves #182206
Resolves #181977
Resolves #168768
Resolves #168769
Resolves #168770
Resolves #168771
Resolves #168772
Resolves #183104
Resolves #173854

Successful Flaky Test Runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7267

@michaelolo24 michaelolo24 added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.16.0 labels Oct 9, 2024
@michaelolo24 michaelolo24 force-pushed the serverless-test-readiness branch 2 times, most recently from b9e33f1 to 13c99ca Compare October 11, 2024 14:32
@michaelolo24 michaelolo24 force-pushed the serverless-test-readiness branch from 13c99ca to 1235496 Compare October 22, 2024 15:31
@michaelolo24 michaelolo24 force-pushed the serverless-test-readiness branch 5 times, most recently from 4c272d4 to cf970f5 Compare October 23, 2024 23:23
@elastic elastic deleted a comment from kibanamachine Oct 23, 2024
@elastic elastic deleted a comment from kibanamachine Oct 23, 2024
@elastic elastic deleted a comment from elasticmachine Oct 23, 2024
@michaelolo24
Copy link
Contributor Author

michaelolo24 commented Oct 24, 2024

@patrykkopycinski - Anything we have to do regarding upgrading cypress as I believe you've gone through this process before? Thanks!

@@ -342,7 +338,7 @@ describe.skip('Changing alert status', { tags: ['@ess', '@skipInServerless'] },
});
});

it('Closes alerts', () => {
it.skip('Closes alerts', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t2 Analyst seems to have the ability to close alerts here. @MadameSheema is this behavior accurate?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved it in an async way, seems that the t2 analyst has the privilege to close alerts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to maintain this test skipped?

Copy link
Contributor Author

@michaelolo24 michaelolo24 Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will make it ess only with Roles.reader

package.json Outdated
@@ -1687,10 +1687,11 @@
"cssnano": "^5.1.12",
"cssnano-preset-default": "^5.2.12",
"csstype": "^3.0.2",
"cypress": "13.6.3",
"cypress": "13.15.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Cypress due to an issue where cypress tests hang locally when the browser is not focused. Reference: cypress-io/cypress#28392 .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, Cypress updates should be done in a different PR since there are more solutions a part from us that are using Cypress as well and they might be affected by this change.

Before merging this PR and to make sure that this is not impacting other solutions, please make sure that the ci:all-cypress-suites label and you update your branch with the latest main changes to trigger the execution of all the different Cypress tests of the Kibana repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll open a separate PR with just these changes! No worries 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: #198715, will wait on that making it in first 👍🏾

"cypress-axe": "^1.5.0",
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.6.4",
"cypress-network-idle": "^1.14.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of relying on the global loading indicator being present for the alerts based tests, we'll instead wait for network requests to complete on the page (this helps avoid flakiness due to any loading indicator flicker)

@michaelolo24 michaelolo24 added v8.17.0 backport:version Backport to applied version labels and removed v8.16.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 24, 2024
@michaelolo24
Copy link
Contributor Author

/ci

1 similar comment
@michaelolo24
Copy link
Contributor Author

/ci

cy.get(GET_DATA_GRID_HEADER_CELL_ACTION_GROUP(timestampField))
.should('be.visible')
.should('contain.text', 'Sort Old-New');

cy.log('Number column');

const riskScoreField = DATA_GRID_FIELDS.RISK_SCORE.fieldName;
cy.get(GET_DATA_GRID_HEADER(riskScoreField)).trigger('click');
cy.get(GET_DATA_GRID_HEADER_ACTION_BUTTON(riskScoreField)).realHover().trigger('click');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cy.get(GET_DATA_GRID_HEADER_CELL_ACTION_GROUP(riskScoreField))
.should('be.visible')
.should('contain.text', 'Sort Low-High');

cy.log('Text Column');

const ruleField = DATA_GRID_FIELDS.RULE.fieldName;
cy.get(GET_DATA_GRID_HEADER(ruleField)).trigger('click');
cy.get(GET_DATA_GRID_HEADER_ACTION_BUTTON(ruleField)).realHover().trigger('click');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fillAddFilterForm,
fillKqlQueryBar,
openAddFilterPopover,
removeKqlFilter,
} from '../../../tasks/search_bar';
import { openActiveTimeline } from '../../../tasks/timeline';

import { ALERTS_URL } from '../../../urls/navigation';

// Failing: See https://github.com/elastic/kibana/issues/193840
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why the comment has not been removed?

Copy link
Contributor Author

@michaelolo24 michaelolo24 Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just missed this one. Removing it in my next commit 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why next PR? This one is outdated so you're going to have to rebase/merge main so the build is going to have to run again anyway... Might as well make this change now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miswrote...my next commit* I have it on my local branch now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Now you can't prove it said next PR lol 😁

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, are you sure? 😝
Screenshot 2024-11-01 at 10 23 51 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fake news...lol

@michaelolo24 michaelolo24 force-pushed the serverless-test-readiness branch 2 times, most recently from 61d2453 to b53a7ed Compare November 1, 2024 21:12
Copy link
Contributor

@angorayc angorayc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @michaelolo24

Copy link
Member

@MadameSheema MadameSheema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of thanks for investing the time on unskipping tests!! :)

Please make sure that #198715 is merged first!

@michaelolo24
Copy link
Contributor Author

Thanks all! Just waiting on this to update this PR and merge

@michaelolo24 michaelolo24 force-pushed the serverless-test-readiness branch from d14164b to d4e4c65 Compare November 7, 2024 14:33
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@michaelolo24 michaelolo24 merged commit 3f236b1 into elastic:main Nov 7, 2024
41 checks passed
@michaelolo24 michaelolo24 changed the title [WIP] - Unskip threat hunting tests [Security Solution][Threat Hunting] - Unskip threat hunting tests Nov 7, 2024
mbondyra pushed a commit to mbondyra/kibana that referenced this pull request Nov 8, 2024
1. Added `cypress-network-idle` to better wait for a full page load as a
loading indicator flicker could cause flakiness.

2. List of addressed open issues:

Resolves elastic#191819
Resolves elastic#178367
Resolves elastic#176757
Resolves elastic#176759
Resolves elastic#176758
Resolves elastic#193840
Resolves elastic#182206
Resolves elastic#181977
Resolves elastic#168768
Resolves elastic#168769
Resolves elastic#168770
Resolves elastic#168771
Resolves elastic#168772
Resolves elastic#183104
Resolves elastic#173854

Successful Flaky Test Runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7267

---------

Co-authored-by: kibanamachine <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 8, 2024
1. Added `cypress-network-idle` to better wait for a full page load as a
loading indicator flicker could cause flakiness.

2. List of addressed open issues:

Resolves elastic#191819
Resolves elastic#178367
Resolves elastic#176757
Resolves elastic#176759
Resolves elastic#176758
Resolves elastic#193840
Resolves elastic#182206
Resolves elastic#181977
Resolves elastic#168768
Resolves elastic#168769
Resolves elastic#168770
Resolves elastic#168771
Resolves elastic#168772
Resolves elastic#183104
Resolves elastic#173854

Successful Flaky Test Runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7267

---------

Co-authored-by: kibanamachine <[email protected]>
@michaelolo24
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Nov 26, 2024
1. Added `cypress-network-idle` to better wait for a full page load as a
loading indicator flicker could cause flakiness.

2. List of addressed open issues:

Resolves elastic#191819
Resolves elastic#178367
Resolves elastic#176757
Resolves elastic#176759
Resolves elastic#176758
Resolves elastic#193840
Resolves elastic#182206
Resolves elastic#181977
Resolves elastic#168768
Resolves elastic#168769
Resolves elastic#168770
Resolves elastic#168771
Resolves elastic#168772
Resolves elastic#183104
Resolves elastic#173854

Successful Flaky Test Runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7267

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 3f236b1)
michaelolo24 added a commit that referenced this pull request Nov 27, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[WIP] - Unskip threat hunting tests
(#195662)](#195662)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Michael
Olorunnisola","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T16:30:23Z","message":"[WIP]
- Unskip threat hunting tests (#195662)\n\n1. Added
`cypress-network-idle` to better wait for a full page load as
a\r\nloading indicator flicker could cause flakiness.\r\n\r\n2. List of
addressed open issues:\r\n\r\nResolves
https://github.com/elastic/kibana/issues/191819\r\nResolves
https://github.com/elastic/kibana/issues/178367\r\nResolves
https://github.com/elastic/kibana/issues/176757\r\nResolves
https://github.com/elastic/kibana/issues/176759\r\nResolves
https://github.com/elastic/kibana/issues/176758\r\nResolves
https://github.com/elastic/kibana/issues/193840\r\nResolves
https://github.com/elastic/kibana/issues/182206\r\nResolves
https://github.com/elastic/kibana/issues/181977\r\nResolves
https://github.com/elastic/kibana/issues/168768\r\nResolves
https://github.com/elastic/kibana/issues/168769\r\nResolves
https://github.com/elastic/kibana/issues/168770\r\nResolves
https://github.com/elastic/kibana/issues/168771\r\nResolves
https://github.com/elastic/kibana/issues/168772\r\nResolves
https://github.com/elastic/kibana/issues/183104\r\nResolves
https://github.com/elastic/kibana/issues/173854\r\n\r\nSuccessful Flaky
Test
Runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7267\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"3f236b14994cfa024230053b069b7011c2b7434e","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","v8.17.0"],"number":195662,"url":"https://github.com/elastic/kibana/pull/195662","mergeCommit":{"message":"[WIP]
- Unskip threat hunting tests (#195662)\n\n1. Added
`cypress-network-idle` to better wait for a full page load as
a\r\nloading indicator flicker could cause flakiness.\r\n\r\n2. List of
addressed open issues:\r\n\r\nResolves
https://github.com/elastic/kibana/issues/191819\r\nResolves
https://github.com/elastic/kibana/issues/178367\r\nResolves
https://github.com/elastic/kibana/issues/176757\r\nResolves
https://github.com/elastic/kibana/issues/176759\r\nResolves
https://github.com/elastic/kibana/issues/176758\r\nResolves
https://github.com/elastic/kibana/issues/193840\r\nResolves
https://github.com/elastic/kibana/issues/182206\r\nResolves
https://github.com/elastic/kibana/issues/181977\r\nResolves
https://github.com/elastic/kibana/issues/168768\r\nResolves
https://github.com/elastic/kibana/issues/168769\r\nResolves
https://github.com/elastic/kibana/issues/168770\r\nResolves
https://github.com/elastic/kibana/issues/168771\r\nResolves
https://github.com/elastic/kibana/issues/168772\r\nResolves
https://github.com/elastic/kibana/issues/183104\r\nResolves
https://github.com/elastic/kibana/issues/173854\r\n\r\nSuccessful Flaky
Test
Runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7267\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"3f236b14994cfa024230053b069b7011c2b7434e"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195662","number":195662,"mergeCommit":{"message":"[WIP]
- Unskip threat hunting tests (#195662)\n\n1. Added
`cypress-network-idle` to better wait for a full page load as
a\r\nloading indicator flicker could cause flakiness.\r\n\r\n2. List of
addressed open issues:\r\n\r\nResolves
https://github.com/elastic/kibana/issues/191819\r\nResolves
https://github.com/elastic/kibana/issues/178367\r\nResolves
https://github.com/elastic/kibana/issues/176757\r\nResolves
https://github.com/elastic/kibana/issues/176759\r\nResolves
https://github.com/elastic/kibana/issues/176758\r\nResolves
https://github.com/elastic/kibana/issues/193840\r\nResolves
https://github.com/elastic/kibana/issues/182206\r\nResolves
https://github.com/elastic/kibana/issues/181977\r\nResolves
https://github.com/elastic/kibana/issues/168768\r\nResolves
https://github.com/elastic/kibana/issues/168769\r\nResolves
https://github.com/elastic/kibana/issues/168770\r\nResolves
https://github.com/elastic/kibana/issues/168771\r\nResolves
https://github.com/elastic/kibana/issues/168772\r\nResolves
https://github.com/elastic/kibana/issues/183104\r\nResolves
https://github.com/elastic/kibana/issues/173854\r\n\r\nSuccessful Flaky
Test
Runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7267\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"3f236b14994cfa024230053b069b7011c2b7434e"}},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.17.0 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response·cy·ts - Detection response view Redirection to AlertPage should redirect to alert page with rule name & status as filters should redirect to alert page with rule name & status as filters Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response·cy·ts - Detection response view Redirection to AlertPage should redirect to alert page with user, status and severity as the filters should redirect to alert page with user, status and severity as the filters Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response·cy·ts - Detection response view Redirection to AlertPage should redirect to alert page with user and status as the filters should redirect to alert page with user and status as the filters Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response·cy·ts - Detection response view Redirection to AlertPage should redirect to alert page with host, status and severity as the filters should redirect to alert page with host, status and severity as the filters Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response·cy·ts - Detection response view Redirection to AlertPage should redirect to alert page with host and status as the filters should redirect to alert page with host and status as the filters
9 participants