From d6a5c54abab29ae3fe4482a832f7b0fc0602a10b Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 25 Aug 2020 11:17:05 +0200 Subject: [PATCH] Create junit reports for cypress test and do not fail the build --- Jenkinsfile | 2 +- package.json | 2 +- scm-it/pom.xml | 5 +++++ scm-ui/e2e-tests/package.json | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ba6dc73743..2ef5929e09 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -75,7 +75,7 @@ node('docker') { integrationTest: { stage('Integration Test') { mvn 'verify -Pit -DskipUnitTests -pl :scm-webapp,:scm-it -Dmaven.test.failure.ignore=true' - junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml' + junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml,**/target/cypress-reports/TEST-*.xml' archiveArtifacts allowEmptyArchive: true, artifacts: 'scm-ui/e2e-tests/cypress/videos/*.mp4' archiveArtifacts allowEmptyArchive: true, artifacts: 'scm-ui/e2e-tests/cypress/screenshots/**/*.png' } diff --git a/package.json b/package.json index 830a3c6bd3..4772263be5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "webpack --mode=production --config=scm-ui/ui-scripts/src/webpack.config.js", "build:dev": "webpack --mode=development --config=scm-ui/ui-scripts/src/webpack.config.js", "test": "lerna run --scope '@scm-manager/ui-*' --scope '@scm-manager/eslint-config' test", - "e2e-tests": "lerna run --scope '@scm-manager/e2e-tests' headless", + "e2e-tests": "lerna run --scope '@scm-manager/e2e-tests' ci", "typecheck": "lerna run --scope '@scm-manager/ui-*' typecheck", "serve": "NODE_ENV=development webpack-dev-server --hot --mode=development --config=scm-ui/ui-scripts/src/webpack.config.js", "deploy": "ui-scripts publish", diff --git a/scm-it/pom.xml b/scm-it/pom.xml index c8fcf53bf1..6911304659 100644 --- a/scm-it/pom.xml +++ b/scm-it/pom.xml @@ -199,6 +199,11 @@ ${yarn.version} + + true diff --git a/scm-ui/e2e-tests/package.json b/scm-ui/e2e-tests/package.json index a9284c832b..f4b6898bc9 100644 --- a/scm-ui/e2e-tests/package.json +++ b/scm-ui/e2e-tests/package.json @@ -7,7 +7,8 @@ "license": "MIT", "private": false, "scripts": { - "headless": "cypress run" + "headless": "cypress run", + "ci": "cypress run --reporter junit --reporter-options \"mochaFile=../target/cypress-reports/TEST-[hash].xml\"" }, "devDependencies": { "cypress": "^4.12.0",