forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EDR Workflows] Flaky CY e2e tests (elastic#167870)
This pull request tackles flaky `artifacts.cy.ts` e2e test. Ran 7+ times without flakiness in CI. Added Test Burning to Defend Workflows pipeline. Changed: 1. Removed `.first()` selectors in favour of explicit element getters 2. Removed method chain 3. Moved url change from `before` to test body. 4. In `beforeAll` now we first fetch current revision number, then run `Promise.all` on `removeAllArtifacts` which resolves with `true/false` based on whether they actually removed an artifact. Its being counted then and with this number we know what next revision should be (revision fetched before removal + times removal was successful). We query API recursively until revisions match and only then we can be sure that displayed in the UI revision is up to date. This fixes the main reason of the flakiness of this test and makes it a pure test that should always yield the same result no matter the number of runs. --------- Co-authored-by: Patryk Kopyciński <[email protected]>
- Loading branch information
1 parent
59af9b3
commit be26b7d
Showing
6 changed files
with
121 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
17 changes: 17 additions & 0 deletions
17
.buildkite/scripts/steps/functional/defend_workflows_burn.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/steps/functional/common.sh | ||
source .buildkite/scripts/steps/functional/common_cypress.sh | ||
|
||
.buildkite/scripts/bootstrap.sh | ||
node scripts/build_kibana_platform_plugins.js | ||
|
||
export JOB=kibana-defend-workflows-cypress | ||
|
||
buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'false' | ||
|
||
echo "--- Defend Workflows Cypress tests, burning changed specs (Chrome)" | ||
|
||
yarn --cwd x-pack/plugins/security_solution cypress:changed-specs-only |
17 changes: 17 additions & 0 deletions
17
.buildkite/scripts/steps/functional/defend_workflows_serverless_burn.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/steps/functional/common.sh | ||
source .buildkite/scripts/steps/functional/common_cypress.sh | ||
|
||
.buildkite/scripts/bootstrap.sh | ||
node scripts/build_kibana_platform_plugins.js | ||
|
||
export JOB=kibana-defend-workflows-serverless-cypress | ||
|
||
buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'false' | ||
|
||
echo "--- Defend Workflows Cypress tests, burning changed specs (Chrome)" | ||
|
||
yarn --cwd x-pack/plugins/security_solution cypress:dw:serverless:changed-specs-only |
This file contains 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
This file contains 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
This file contains 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