-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[security_solution] Cypress flaky tests catcher (#162376)
## Summary Inspired by https://glebbahmutov.com/blog/burning-tests/ Implements the idea presented here https://glebbahmutov.com/blog/burning-tests/#bonus-3-burning-new-or-changed-specs In short, on PR that is changing/adding new Cypress spec files we will try to "burn" them, it means we will try to run each `it` `2` times to make sure tests are written in a way that gives Cypress a chance to recover from the failed test. Also adding a command that allows to "burn" tests locally ``` yarn cypress:burn --spec "<>" ``` Right now the job is set to `soft_fail`, so it is not going to block the PR from merging, but hopefully will help the Team to recognize potential flakiness before it is merged to `main`
- Loading branch information
1 parent
5d81300
commit 09aaecb
Showing
8 changed files
with
610 additions
and
19 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
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.