Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41079

Pipeline script completes with the exit code 1 when the tests fail but doesn't execute the report generation script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • pipeline
    • None

      sh '''sudo npm install -g webdriver-manager
      sudo webdriver-manager update --standalone
      sudo webdriver-manager start &
      export DISPLAY=:1
      echo "selenium server started"
      sleep 100
      echo "Tests Starting in 100 secs"
      protractor e2e/protractor.conf.js
      echo "shutting down selenium server"
      sudo webdriver-manager shutdown'''
      publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'reports', reportFiles: 'index.html', reportName: 'OneCreative UI Test Report'])

      Pipeline doesn't execute the steps after "protractor e2e/protractor.conf.js" when the test fails with the exit code 1. Right now for the report generation to work, i'm diverting the exit code to 0 when it returns 1.

            Unassigned Unassigned
            balajicbabu Balaji Chandrababu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: