awslabs / aws-device-farm-jenkins-plugin

Jenkins plugin for AWS Device Farm.
Apache License 2.0
89 stars 66 forks source link

Jenkins Pipeline not failing when tests fail #133

Open kotlinize opened 1 year ago

kotlinize commented 1 year ago

Issue: AWS Device Farm tests are failing, however, the Jenkins device farm script is not failing the current stage of my pipeline. I am using AWS Device Farm for Android Instrumentation Tests. I have attempted changing the 'ignoreRunError' variable with no change in output.

Configuration:

AWS Device Farm Plugin Version: 1.32


stage('Instrumentation Test') {
      steps {
        script {
          devicefarm(
            appArtifact: 'app/build/outputs/apk/basic/staging/app-basic-staging.apk',
            appiumJavaJUnitTest: '',
            appiumJavaTestNGTest: '',
            appiumNodeTest: '',
            appiumPythonTest: '',
            appiumRubyTest: '',
            appiumVersionJunit: '1.4.16',
            appiumVersionPython: '1.4.16',
            appiumVersionTestng: '1.4.16',
            calabashFeatures: '',
            calabashProfile: '',
            calabashTags: '',
            deviceLatitude: 47.6204,
            deviceLocation: true,
            deviceLongitude: -122.3941,
            devicePoolName: 'Static Test Pool',
            environmentToRun: 'CustomEnvironment',
            eventCount: '',
            eventThrottle: '',
            extraData: false,
            extraDataArtifact: '',
            ifAppPerformanceMonitoring: false,
            ifBluetooth: true,
            ifGPS: true,
            ifNfc: true,
            ifSkipAppResigning: false,
            ifVideoRecording: true,
            ifVpce: false,
            ifWebApp: false,
            ifWifi: true,
            ignoreRunError: false,
            isRunUnmetered: false,
            jobTimeoutMinutes: 60,
            junitArtifact: 'app/build/outputs/apk/androidTest/basic/staging/app-basic-staging-androidTest.apk',
            junitFilter: '',
            password: '',
            projectName: 'Android (Regression)',
            radioDetails: true,
            runName: '${BUILD_TAG}',
            seed: '',
            storeResults: false,
            testSpecName: 'Android-Regression.yml',
            testToRun: 'INSTRUMENTATION',
            uiautomationArtifact: '',
            uiautomatorArtifact: '',
            uiautomatorFilter: '',
            username: '',
            vpceServiceName: '',
            xctestArtifact: '',
            xctestFilter: '',
            xctestUiArtifact: '',
            xctestUiFilter: ''
          )
        }
      }
    }
nikhil-dabhade commented 1 year ago

@kotlinize Thanks for sharing. Are you seeing the entire pipeline fail instead of just the step?

kotlinize commented 1 year ago

@nikhil-dabhade

Yes, however, my worry is the pipeline continues to run after the Android Test Step, as opposed to stopping the entire pipeline.