December 2017
Beginner to intermediate
362 pages
8h 35m
English
The pipeline code to perform integration testing is a shell script that will run the Maven commands, as shown in the following command block:
sh 'mvn clean verify -Dsurefire.skip=true';junit '**/target/failsafe-reports/TEST-*.xml'archive 'target/*.jar'
Where -Dsurefire.skip=true is the option to skip unit testing and perform only the integration testing.
The junit '**/target/failsafe-reports/TEST-*.xml' command enables Jenkins to publish JUnit unit test reports on the Jenkins pipeline page. **/target/failsafe-reports/TEST-*.xml is the directory location where the integration test reports are generated.
Wrap the previous step inside a stage called Integration Test:
stage ('Integration Test'){ ...Read now
Unlock full access