added more logic for running tests without killing the whole pipeline, and outputting rspec results
parent
0dec27a01c
commit
3421e18f21
|
|
@ -25,8 +25,12 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Run tests') {
|
stage('Run tests') {
|
||||||
steps {
|
steps {
|
||||||
sh 'cucumber features --format html --out coverage/cucumber.html'
|
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
||||||
sh 'rspec spec'
|
sh 'cucumber features --format html --out coverage/cucumber.html'
|
||||||
|
}
|
||||||
|
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
|
||||||
|
sh 'rspec spec --format html --out coverage/spec.html'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Report results') {
|
stage('Report results') {
|
||||||
|
|
@ -37,9 +41,9 @@ pipeline {
|
||||||
alwaysLinkToLastBuild: false,
|
alwaysLinkToLastBuild: false,
|
||||||
keepAll: true,
|
keepAll: true,
|
||||||
reportDir: 'coverage',
|
reportDir: 'coverage',
|
||||||
reportFiles: 'cucumber.html, index.html',
|
reportFiles: 'cucumber.html, spec.html, index.html',
|
||||||
reportName: 'Test Results',
|
reportName: 'Test Results',
|
||||||
reportTitles: 'Cucumber Results, Test Coverage'])
|
reportTitles: 'Cucumber Results, RSpec Results, Test Coverage'])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue