1.

How does Jenkins handle a failed test case?

Answer»
  • Pipelines artifacts
  • Jenkins has built-in artifacts to RECORD and CAPTURE the FAILURES for analysis and investigation.
  • This needs to be mentioned in the JENKINSFILE pipeline:

Sample code:

Pipeline { agent any stages { stage(‘Build’) { steps { sh ‘./test_suite1 build’ } } Stage(‘Test’) { Steps { sh ‘./test_suite1 test’ } } } post { ALWAYS { archiveArtifacts ‘build/libs/**/*.jar’ } } }

This gives the artifacts path and the filename



Discussion

No Comment Found