-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…3992) # Backport This will backport the following commits from `main` to `7.17`: - [[security_solution] Cypress flaky tests catcher (#162376)](#162376) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Patryk Kopyciński","email":"contact@patrykkopycinski.com"},"sourceCommit":{"committedDate":"2023-08-09T21:58:04Z","message":"[security_solution] Cypress flaky tests catcher (#162376)\n\n## Summary\r\n\r\nInspired by https://glebbahmutov.com/blog/burning-tests/\r\n\r\nImplements the idea presented here\r\nhttps://glebbahmutov.com/blog/burning-tests/#bonus-3-burning-new-or-changed-specs\r\n\r\nIn short, on PR that is changing/adding new Cypress spec files we will\r\ntry to \"burn\" them, it means we will try to run each `it` `2` times to\r\nmake sure tests are written in a way that gives Cypress a chance to\r\nrecover from the failed test.\r\nAlso adding a command that allows to \"burn\" tests locally\r\n```\r\nyarn cypress:burn --spec \"<>\"\r\n```\r\n\r\nRight now the job is set to `soft_fail`, so it is not going to block the\r\nPR from merging, but hopefully will help the Team to recognize potential\r\nflakiness before it is merged to `main`","sha":"09aaecb59d5e82e17bf6f274de3cedd394bbe25b","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v8.10.0"],"number":162376,"url":"#162376 Cypress flaky tests catcher (#162376)\n\n## Summary\r\n\r\nInspired by https://glebbahmutov.com/blog/burning-tests/\r\n\r\nImplements the idea presented here\r\nhttps://glebbahmutov.com/blog/burning-tests/#bonus-3-burning-new-or-changed-specs\r\n\r\nIn short, on PR that is changing/adding new Cypress spec files we will\r\ntry to \"burn\" them, it means we will try to run each `it` `2` times to\r\nmake sure tests are written in a way that gives Cypress a chance to\r\nrecover from the failed test.\r\nAlso adding a command that allows to \"burn\" tests locally\r\n```\r\nyarn cypress:burn --spec \"<>\"\r\n```\r\n\r\nRight now the job is set to `soft_fail`, so it is not going to block the\r\nPR from merging, but hopefully will help the Team to recognize potential\r\nflakiness before it is merged to `main`","sha":"09aaecb59d5e82e17bf6f274de3cedd394bbe25b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"#162376 Cypress flaky tests catcher (#162376)\n\n## Summary\r\n\r\nInspired by https://glebbahmutov.com/blog/burning-tests/\r\n\r\nImplements the idea presented here\r\nhttps://glebbahmutov.com/blog/burning-tests/#bonus-3-burning-new-or-changed-specs\r\n\r\nIn short, on PR that is changing/adding new Cypress spec files we will\r\ntry to \"burn\" them, it means we will try to run each `it` `2` times to\r\nmake sure tests are written in a way that gives Cypress a chance to\r\nrecover from the failed test.\r\nAlso adding a command that allows to \"burn\" tests locally\r\n```\r\nyarn cypress:burn --spec \"<>\"\r\n```\r\n\r\nRight now the job is set to `soft_fail`, so it is not going to block the\r\nPR from merging, but hopefully will help the Team to recognize potential\r\nflakiness before it is merged to `main`","sha":"09aaecb59d5e82e17bf6f274de3cedd394bbe25b"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
- Loading branch information
1 parent
155ee2d
commit d48e3db
Showing
10 changed files
with
17,318 additions
and
12,250 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
15 changes: 15 additions & 0 deletions
15
.buildkite/scripts/steps/functional/security_solution_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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/steps/functional/common.sh | ||
source .buildkite/scripts/steps/functional/common_cypress.sh | ||
|
||
export JOB=kibana-security-solution-chrome | ||
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} | ||
|
||
buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'false' | ||
|
||
echo "--- Security Solution Cypress tests, burning changed specs (Chrome)" | ||
|
||
yarn --cwd x-pack/plugins/security_solution cypress: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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.