Create junit reports for cypress test and do not fail the build

This commit is contained in:
Sebastian Sdorra
2020-08-25 11:17:05 +02:00
parent 6a390ee811
commit d6a5c54aba
4 changed files with 9 additions and 3 deletions

2
Jenkinsfile vendored
View File

@@ -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'
}

View File

@@ -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",

View File

@@ -199,6 +199,11 @@
<version>${yarn.version}</version>
</pkgManager>
<script>e2e-tests</script>
<!--
we want not fail the build,
we want to mark it as unstable and record the test results
-->
<ignoreFailure>true</ignoreFailure>
</configuration>
<executions>
<execution>

View File

@@ -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",