Read the Jenkinsfile: parallel browser stages
QuizMediumAsked in: Capgemini, Infosys, Swiggy
Read the Jenkinsfile.
Jenkinsfile
pipeline {
agent none
stages {
stage('UI tests') {
failFast false
parallel {
stage('Chrome') {
agent { label 'linux' }
steps {
sh 'mvn -B test -Dbrowser=chrome'
}
post {
always {
junit 'target/surefire-reports/*.xml'
}
}
}
stage('Firefox') {
agent { label 'linux' }
steps {
sh 'mvn -B test -Dbrowser=firefox'
}
post {
always {
junit 'target/surefire-reports/*.xml'
}
}
}
}
}
}
}
Which statements are true? Choose all that apply.
- The Chrome and Firefox stages run at the same time, each on its own linux agent
- If the Chrome stage fails, the Firefox stage keeps running, because failFast is false
- Each branch publishes its own JUnit results, even when its tests fail
- agent none means the stages run on no machine and do nothing
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.