Jenkins Test cypress echo

This commit is contained in:
ismailali1553
2025-01-13 15:02:04 +01:00
parent 7104ed20c1
commit 3258069e5e

15
Jenkinsfile vendored
View File

@@ -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."
}
}
}