Jenkins Test cypress echo
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -31,11 +31,18 @@ pipeline {
|
|||||||
stage('Run Cypress Tests') {
|
stage('Run Cypress Tests') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// Install Cypress (falls nicht bereits installiert)
|
echo "Installing Cypress..."
|
||||||
sh 'npx cypress install'
|
sh 'npx cypress install'
|
||||||
|
|
||||||
// Cypress Tests ausführen
|
echo "Running Cypress Tests..."
|
||||||
sh 'npx cypress run'
|
try {
|
||||||
|
sh 'npx cypress run --reporter spec'
|
||||||
|
} catch (err) {
|
||||||
|
echo "Cypress Tests Failed!"
|
||||||
|
error "Build failed due to Cypress test failures."
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Cypress Tests Completed."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user