CI/CD
Own the TEST STAGE — 'I consume the platform, I own the test stage.' Jenkins slightly outranks GH Actions in our pool. STOP before Jenkins admin, K8s ops, Terraform, deployment mechanics.
- What CI/CD is & why tests belong in it
CI/CD runs the test suite automatically on a shared server on every code change and uses the result to gate merges/releases.
'How do you integrate your automated tests into a CI/CD pipeline?' / 'Walk me through the stages of your test pipeline.'
- The gate chain: exit code -> job status -> required check -> merge blocked
A failing test exits non-zero, the job fails, the PR check goes red, and branch-protection required-checks physically block the merge.
'What actually stops broken code from reaching main?' / 'What's a quality gate?'
- Branch protection -> required status checks (the real merge gate)
Repo setting that requires named checks to pass before merge is allowed; this is what converts a red build into a blocked merge.
'How is the gate actually enforced in GitHub?'
- Triggers: push / pull_request / schedule(cron) / workflow_dispatch
Control when a workflow runs and the difference between running on PR vs on merge to main.
'When does your pipeline run?' / 'PR builds vs nightly builds?'
- Marketplace vs shell: uses vs run; core actions (checkout, setup-python, cache, upload-artifact)
Know when a step calls a reusable action (uses:) vs runs a shell command (run:) and the four workhorse actions.
Follow-ups while whiteboarding the workflow.
- Author a GHA workflow from scratch (checkout/setup-python/install/pytest/artifact)
Write a working .github/workflows/*.yml that checks out code, sets up Python, installs deps + browsers, runs pytest, and uploads the report.
'Write a GitHub Actions workflow that runs Playwright tests on every PR.'
- Jenkinsfile literacy: declarative pipeline stages/steps, read + add a Test stage
Understand a declarative Jenkinsfile (pipeline { agent / stages / stage('Test') { steps {...} } }) well enough to read one and add a test stage.
'Add a stage to this Jenkinsfile that runs the regression suite and publishes the report.'
- Jenkins reporting + credentials: post{always{}}, junit/publishHTML, withCredentials
The Jenkins equivalents of GHA artifacts/secrets: post{always{}} block, junit/publishHTML for reports, withCredentials/credentials() for secrets.
'How do reports and credentials work in Jenkins vs GitHub Actions?'
- Jenkins vs GitHub Actions trade-off
When to pick which: Jenkins = self-hosted, customizable, plugin-rich, you maintain it; GHA = GitHub-native, serverless, YAML, zero-maintenance.
'Jenkins vs GitHub Actions - when would you pick which?'
- Azure DevOps Pipelines - name-level awareness (YAML pipelines)
Azure Pipelines YAML is another CI platform; same trigger/stage/step concepts.
'Any Azure DevOps exposure?' (screening).
- GitLab CI - name + concepts (parallel keyword, native Docker, MR integration)
.gitlab-ci.yml with stages/jobs; the 'parallel' keyword makes sharding trivial; native Docker + merge-request integration.
'Have you used GitLab CI?' / 'How would you shard in GitLab?'
- CircleCI / Harness / Drone - recognize as CI platforms
Other hosted CI platforms that appear in some JDs; same pipeline concepts.
Screening keyword match only.
- Define quality gates + give concrete examples
A gate is an automated pass/fail rule that must be green to merge/release (all required suites pass, min coverage, no critical vulns, required reviewer).
'What's a quality gate? Give examples.' / 'Own CI/CD quality gates - decide what blocks a merge.'
- Coverage gate (--cov-fail-under) as one gate, not the gate
Fail the build when coverage drops below a threshold via pytest --cov --cov-fail-under=N.
'How do you enforce coverage in CI?'
- Artifacts on failure (if: always() / if: !cancelled())
Upload HTML report + traces + JUnit XML even when tests fail, using if: always()/!cancelled().
'Where do artifacts go and how do you get them on failure?'
- Report formats: Playwright HTML, traces (retain-on-failure), JUnit XML
Know the three artifact types and that JUnit XML is what CI natively parses for pass/fail and test-result UIs.
'What reports does your pipeline produce and how do you triage a failure?'
- Centralized dashboards: Allure / ReportPortal
Aggregated historical test-result dashboards across runs (trends, flaky history, categorization).
'How do you visualize test results over time?'
- Sharding vs workers (across machines vs across cores)
workers/pytest-xdist parallelize across CPU cores on one machine; sharding splits the suite across multiple CI machines via a job matrix.
'How would you cut a 40-minute suite to under 10?' / 'How do you run tests in parallel in CI?'
- Matrix strategy (browsers / Python versions / shards)
strategy: matrix fans one job into N parallel jobs across browsers, versions, or shard indices.
'How do you run across browsers/versions in CI?'
- Caching (pip deps / browser binaries)
Cache dependencies and browser binaries to cut minutes off every run.
'How do you speed up CI runs?' (paired with sharding answer).
- Merging sharded results into one report
Fan-out/fan-in: each shard emits partial results, a final needs:-dependent job merges them into one report.
'You sharded the suite - how do you get one combined report?'
- Sharding a PYTEST suite (pytest-shard / pytest-split) - NOT native --shard
For his Python/pytest stack sharding needs a plugin: pytest-shard (--shard-id/--num-shards, hash-based) or pytest-split (--splits/--group, duration-based).
'How do you shard a pytest suite across CI machines?' (deep follow-up exposes the runner nuance).
- Run tests in the pinned Playwright container (determinism)
Run tests inside mcr.microsoft.com/playwright/python:<ver>-noble so browsers + system libs are baked in and CI matches local.
'How do you make CI reproducible?' / 'Why run tests in Docker?'
- Kubernetes awareness (tests run in pods) - not operating it
Tests can execute inside K8s pods; knowing that is enough for an SDET.
'Any Kubernetes exposure?' (screening).
- Debug 'passes locally, fails in CI'
Systematic diagnosis of environment-specific failures.
'A test passes locally but fails in CI - how do you debug?'
- Handle flaky tests in CI (retry-without-masking, quarantine)
Identify flaky tests, retry in CI (retries: 2 max) without masking, quarantine so they don't block the gate, track, root-cause, re-enable.
'How do you handle flaky tests in CI?' (asked almost universally).
- Flaky rate as a tracked metric
Measure flaky rate as a number; treat >2% as a reliability incident, not noise.
'How do you know your CI is trustworthy?'
- Secrets handling + masking (never hardcode)
Inject secrets via GHA encrypted secrets (${{ secrets.X }}) or Jenkins credentials; they are masked in logs and passed as env vars.
'How do you handle secrets/credentials in the pipeline?'
- Scheduled / nightly runs (cron) + PR-vs-nightly strategy
Run a fast subset on PRs and the full cross-browser suite nightly via cron.
'Do you run everything on every PR? How do you balance speed and coverage?'
- Failure notifications (Slack/Teams webhook, PR comment)
Post pass/fail to Slack/Teams via webhook on failure and/or comment the report link on the PR.
'How does the team find out a build failed?'
- Test data / environment provisioning + cleanup in CI
Provision the app + data CI needs per run: DB seeding, test-data factories, sidecar services (GHA services:/docker-compose), cleanup.
'How do you manage test data in CI when tests run on every PR?'
- Reusable workflows / composite actions (GHA) & shared libraries (Jenkins)
DRY pipeline logic reused across repos.
'How do you avoid duplicating pipeline config across services?'
- Ephemeral / preview environments per PR
Spin a fresh app instance per PR, run E2E against it, tear it down; usually DevOps-built.
'How would you test against isolated per-PR environments?'
- Selective / impacted-test execution
Run only tests affected by the diff on PRs, full suite nightly.
'How do you keep PR feedback fast as the suite grows?'
- Dynamic sharding (compute shard count from test volume)
Derive shard count from actual test volume instead of hardcoding, eliminating maintenance.
Design-question follow-up on scaling the pipeline.
- CI/CD design question fluency
Architect a pipeline end-to-end under interview pressure.
'Architect a CI/CD pipeline for 500 daily test runs.'
- Gating non-deterministic LLM-eval suites in CI
LLM outputs are non-deterministic, so CI gates them with threshold/score bands (pass-rate, score windows), not exact-match asserts.
'How would you put an AI/LLM feature under a CI quality gate?'
- SDET-owns vs DevOps-owns line
SDET owns the test stage (steps that run the suite, gates, parallelization, flakiness, reports); DevOps/SRE owns the platform (runners, cluster, deploy mechanics, secret infra).
'Where does your responsibility for the pipeline end?'
- Jenkins server administration (install, plugins, master/agent scaling, JVM tuning)
Running and maintaining the Jenkins platform itself.
Rarely asked of an SDET-2; only to disqualify over-claims.
- K8s cluster ops / Terraform IaC / CD deploy mechanics (blue-green, canary, ArgoCD)
Cluster operation, infrastructure-as-code provisioning, and the deployment/release half of CD.
Only to test that you know your boundary.
- Secrets infrastructure (Vault/KMS ops, rotation), runner-fleet mgmt, observability platform ops
Operating the vault, the runner fleet, and the Prometheus/Grafana/Datadog stack.
Boundary check only.