mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[EDR Workflows] Add junit config to osquery cypress tests (#169060)
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
This commit is contained in:
parent
9a9c21bfa5
commit
69cfe3ac49
7 changed files with 32 additions and 10 deletions
|
@ -10,8 +10,6 @@ steps:
|
|||
automatic:
|
||||
- exit_status: '*'
|
||||
limit: 1
|
||||
artifact_paths:
|
||||
- "target/kibana-osquery/**/*"
|
||||
|
||||
- command: .buildkite/scripts/steps/functional/security_serverless_osquery.sh
|
||||
label: 'Serverless Osquery Cypress Tests'
|
||||
|
@ -24,8 +22,6 @@ steps:
|
|||
automatic:
|
||||
- exit_status: '*'
|
||||
limit: 1
|
||||
artifact_paths:
|
||||
- 'target/kibana-osquery/**/*'
|
||||
|
||||
- command: .buildkite/scripts/steps/functional/osquery_cypress_burn.sh
|
||||
label: 'Osquery Cypress Tests, burning changed specs'
|
||||
|
@ -36,5 +32,3 @@ steps:
|
|||
soft_fail: true
|
||||
retry:
|
||||
automatic: false
|
||||
artifact_paths:
|
||||
- 'target/kibana-osquery/**/*'
|
|
@ -14,6 +14,7 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
|
|||
buildkite-agent artifact upload 'target/kibana-coverage/functional/**/*'
|
||||
buildkite-agent artifact upload 'target/kibana-*'
|
||||
buildkite-agent artifact upload 'target/kibana-security-solution/**/*.png'
|
||||
buildkite-agent artifact upload 'target/kibana-osquery/**/*.png'
|
||||
buildkite-agent artifact upload 'target/kibana-fleet/**/*.png'
|
||||
buildkite-agent artifact upload 'target/test-metrics/*'
|
||||
buildkite-agent artifact upload 'target/test-suites-ci-plan.json'
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
source .buildkite/scripts/common/util.sh
|
||||
source .buildkite/scripts/steps/functional/common.sh
|
||||
source .buildkite/scripts/steps/functional/common_cypress.sh
|
||||
|
||||
.buildkite/scripts/bootstrap.sh
|
||||
# TODO: remove the line below to use build artifacts for tests.
|
||||
# in addition to remove the line, we will have to expose the kibana install dir into the downloaded build location
|
||||
# by exporting a var like:
|
||||
# export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
|
||||
node scripts/build_kibana_platform_plugins.js
|
||||
|
||||
export JOB=kibana-osquery-cypress
|
||||
|
@ -14,4 +17,5 @@ echo "--- Osquery Cypress tests"
|
|||
|
||||
cd x-pack/plugins/osquery
|
||||
|
||||
yarn --cwd x-pack/plugins/osquery cypress:run
|
||||
set +e
|
||||
yarn cypress:run; status=$?; yarn junit:merge || :; exit $status
|
||||
|
|
|
@ -15,4 +15,7 @@ export JOB=kibana-osquery-cypress-serverless
|
|||
|
||||
echo "--- Security Osquery Serverless Cypress"
|
||||
|
||||
yarn --cwd x-pack/plugins/osquery cypress:serverless:run
|
||||
cd x-pack/plugins/osquery
|
||||
|
||||
set +e
|
||||
yarn cypress:serverless:run; status=$?; yarn junit:merge || :; exit $status
|
||||
|
|
|
@ -20,6 +20,11 @@ const ROLES_YAML_FILE_PATH = path.join(
|
|||
const roleDefinitions = loadYaml(readFileSync(ROLES_YAML_FILE_PATH, 'utf8')) as YamlRoleDefinitions;
|
||||
|
||||
export default defineCypressConfig({
|
||||
reporter: '../../../node_modules/cypress-multi-reporters',
|
||||
reporterOptions: {
|
||||
configFile: './cypress/reporter_config.json',
|
||||
},
|
||||
|
||||
defaultCommandTimeout: 60000,
|
||||
execTimeout: 120000,
|
||||
pageLoadTimeout: 12000,
|
||||
|
|
10
x-pack/plugins/osquery/cypress/reporter_config.json
Normal file
10
x-pack/plugins/osquery/cypress/reporter_config.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"reporterEnabled": "mochawesome, mocha-junit-reporter",
|
||||
"reporterOptions": {
|
||||
"html": false,
|
||||
"json": true,
|
||||
"mochaFile": "../../../target/kibana-osquery/cypress/results/TEST-osquery-cypress-[hash].xml",
|
||||
"overwrite": false,
|
||||
"reportDir": "../../../target/kibana-osquery/cypress/results"
|
||||
}
|
||||
}
|
|
@ -10,6 +10,11 @@ import { setupUserDataLoader } from '../../../test_serverless/functional/test_su
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineCypressConfig({
|
||||
reporter: '../../../node_modules/cypress-multi-reporters',
|
||||
reporterOptions: {
|
||||
configFile: './cypress/reporter_config.json',
|
||||
},
|
||||
|
||||
defaultCommandTimeout: 60000,
|
||||
execTimeout: 60000,
|
||||
pageLoadTimeout: 60000,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue