All subjects

Framework & DevOps · Interview subject

Jenkins / CI-CD Interview Questions

Declarative pipelines, parallel stages, gating, reporting and secrets.

53 questions

Quick interview answer

Declarative pipeline: checkout → build → parallel test stages (smoke/api/ui) → publish reports → notify, parameterised by browser and environment.

Detailed explanation

Use parameters for env/browser/suite, run Selenium Grid in Docker Compose as a pipeline stage, archive Extent/Allure reports, and always run the publish/notify stages in post blocks so failures still report.

groovy
1pipeline {
2 agent any
3 parameters {
4 choice(name: 'ENV', choices: ['qa', 'stage'])
5 choice(name: 'SUITE', choices: ['smoke', 'regression'])
6 }
7 triggers { cron('H 2 * * 1-5') }
8 stages {
9 stage('Test') {
10 steps {
11 sh "mvn clean test -Denv=${params.ENV} -Dsurefire.suiteXmlFiles=suites/${params.SUITE}.xml"
12 }
9 more lines

Real-world example

Nightly 2 AM regression with Slack summary and failed-only rerun stage.

Interview tip

Mention post { always { ... } } — reports must publish even on failure.

Next subjectMobile Testing