Jenkins Test cypress echo
This commit is contained in:
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@@ -31,11 +31,18 @@ pipeline {
|
||||
stage('Run Cypress Tests') {
|
||||
steps {
|
||||
script {
|
||||
// Install Cypress (falls nicht bereits installiert)
|
||||
echo "Installing Cypress..."
|
||||
sh 'npx cypress install'
|
||||
|
||||
// Cypress Tests ausführen
|
||||
sh 'npx cypress run'
|
||||
echo "Running Cypress Tests..."
|
||||
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