From 3258069e5eba077ded4ce79513173c808323a3cc Mon Sep 17 00:00:00 2001 From: ismailali1553 Date: Mon, 13 Jan 2025 15:02:04 +0100 Subject: [PATCH] Jenkins Test cypress echo --- Jenkinsfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1e367f042..9e185d2ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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." } } }