QA Interview Hub · Knowledge base · Quizzes · Українська

All topics

CI/CD interview questions and answers for QA

13 CI/CD questions that come up in QA interviews, with short answers. Open the topic in the knowledge base for a deeper explanation.

What are CI and CD and how does continuous delivery differ from continuous deployment?

CI (continuous integration) means developers merge changes into a shared branch often, and every change is built and tested automatically. This quickly shows what exactly broke the build. CD has two meanings. Continuous delivery: every change that passes the pipeline is ready for release, but a person triggers the deployment to production by pressing a button. Continuous deployment: after a successful pipeline the change goes to production automatically with no manual step. Automated tests are the main quality gate here: if they fail, the change does not go further.

Read the topic

What do you run on a PR, on merge to main and on a schedule?

PR: lint, typecheck, unit, API tests, build and e2e smoke on critical paths — all required checks, aiming for ~10 minutes. Merge to main: a wider set, deploy to staging and a post-deploy smoke. Nightly: full regression, all browsers, visual and long scenarios, a quarantine run; the result is a report and a notification, not a merge block. Independent stages run in parallel, cheap ones first (fail-fast).

Read the topic

What is your policy for flaky tests in CI?

Retries: 1–2 in CI, 0 locally; a test that passed on a retry gets the flaky status, lands in the metrics and leads to a ticket. Quarantine: an unstable test is moved out of the required set, but with an owner, a reason and a deadline, and keeps running nightly. Infrastructure failures: "Re-run failed jobs". No global 5 retries and no skip without an owner: that hides real bugs and destroys trust in the suite.

Read the topic

The pipeline is too slow. Where do you start and what do you do?

First I measure: time breakdown by jobs and steps, p50/p90, runner queue time. Then from cheap to expensive: parallel independent jobs, cache (npm, Docker layers), installing only the browser you need, e2e sharding, selective runs by affected packages (with a full run on main and nightly), moving checks from e2e to API tests, reducing flakiness. Bigger runners last: the bottleneck is rarely the CPU.

Read the topic

What does a pipeline consist of: stage, job, step, runner?

A stage is a phase of the pipeline (build, test, deploy); its jobs usually run in parallel, and the next stage starts after the previous one succeeds. A job is a set of steps that runs on one machine. A step is a single action inside a job: a shell command (npm test) or a ready-made action. A runner is the machine or container where a job runs (GitHub-hosted or self-hosted). GitHub Actions has no stages: there is a workflow with jobs, and the order is set with needs. Example: a test job with the steps checkout, install, npx playwright test and uploading the report as an artifact.

Read the topic

Outline a workflow for Playwright in GitHub Actions.

Triggers: pull_request, push to main, schedule (cron, UTC by default or a timezone key), workflow_dispatch. A job on ubuntu-latest with timeout-minutes: checkout@v7 → setup-node@v7 with cache: npm → npm ci → npx playwright install --with-deps → npx playwright test → upload-artifact@v7 of the report with if: ${{ !cancelled() }} and retention-days. Additionally: concurrency with cancel-in-progress for PRs, a matrix of shards, secrets through env only for the step that needs them.

Read the topic

How do you handle secrets and a database for tests in GitHub Actions?

Secrets live in Settings → Secrets, are used in a workflow as ${{ secrets.NAME }}, in env of only the step that needs them; they are masked in logs and not passed for PRs from forks. Non-sensitive values go to vars. The DB is a service container (services: postgres) with --health-cmd so the steps wait for readiness; on a runner we connect to localhost, in a container job by the service name. The database is ephemeral for every run.

Read the topic

How do you run Playwright in Docker and why does it stabilise results?

We take the official mcr.microsoft.com/playwright image with a tag matching the @playwright/test version (for example v1.65.1-noble) and run it with --ipc=host and --init, mounting the project as a volume. The environment (OS, fonts, browsers) is identical locally and in CI, so visual baselines match. We create baselines in the same image. The tag is bumped together with the Playwright upgrade.

Read the topic

How do you build an ephemeral e2e environment with docker compose?

The db, app and e2e services live in one compose file. db and app have a healthcheck, and dependent services start with depends_on: condition: service_healthy. Services reach each other by name. Run: docker compose up --build --abort-on-container-exit --exit-code-from e2e so the test exit code reaches CI. Reports reach the host via a volume, and after the run docker compose down -v deletes the data, so the DB is clean every time.

Read the topic

How do you run automated tests in Docker on CI?

I run automated tests in the official image with a fixed browser version: for Playwright it is Microsoft's image, for Cypress it is cypress/included with the full tag that pins the browser versions. Then the environment is the same locally and on CI. I bring up the application and its dependencies with Compose before the tests, and after the run I save the reports and remove the containers together with the data.

Read the topic

Which reports and artifacts do you need in CI and how do you share them?

An HTML report for people, JUnit XML for tools (history, PR annotations). Traces, video and screenshots only for failed or retried tests, with a short retention-days. For shards: blob reports with unique names → a job with needs → merge-reports. Upload steps use if: !cancelled(). We share via links: the report on Pages, a PR comment, a summary in $GITHUB_STEP_SUMMARY. Slack notifications only for nightly and main failures.

Read the topic

Which CI metrics do you track?

Pipeline duration as p50 and p90/p95 (not just the average) plus runner queue time; flaky rate and the top unstable tests; main pass rate and the share of red PRs caused by non-code reasons; MTTR of a red main; cost in runner minutes and artifact size. We watch the weekly trend, not a single number: a metric must trigger an action, such as quarantine or optimisation.

Read the topic

How do you triage a mass test failure in the nightly run?

I group failures by message and stack: usually these are 2–3 causes. I find the last green run and look at what changed between them (commits, a deploy, dependencies, data). I classify: a product defect, a test defect or infrastructure. Product gets a ticket with a trace, a test gets a fix or quarantine with an owner, infrastructure gets a re-run and a ticket to the platform team. In the end I add a check that prevents recurrence.

Read the topic

Practice CI/CD with flashcards