Skip to content
TargetQA

Real-Time & Career

CI/CD & Git Interview Questions & Answers

CI/CD and Git interview questions for testers: branching, merge vs rebase, GitHub Actions and Jenkins pipelines, Docker, parallel sharding, reports and quality gates.

50 questions18 Beginner19 Intermediate13 Advanced

Interview Questions

Showing 15 of 50 questions

  1. Continuous Integration merges and validates code frequently with automated builds and tests, while Continuous Delivery/Deployment automatically releases validated builds. Automated tests are the quality gates that decide whether a change can move to the next stage.

  2. clone, pull, checkout/switch, add, commit, push, status, log and diff cover most work. A typical flow is creating a feature branch, committing tests, pushing, and opening a pull request.

  3. Common strategies are GitFlow (develop, feature, release, hotfix branches), GitHub Flow (short-lived feature branches off main), and trunk-based development. Most modern teams use GitHub Flow or trunk-based with feature flags.

  4. Merge combines branches with a merge commit and preserves history as it happened. Rebase replays your commits on top of another branch, producing a linear history but rewriting commit hashes.

  5. Git marks conflicting sections with <<<<<<<, ======= and >>>>>>> markers. Edit the file to keep the correct code, remove the markers, stage the file, and complete the merge or rebase.

  6. A typical pipeline is build, lint and unit tests, API/integration tests, deploy to staging, E2E/smoke tests, then deploy to production with post-deploy smoke checks. Faster, cheaper tests run earlier to fail fast.

  7. Pipelines can be triggered on push, pull request, a schedule (cron), manually, or by another workflow or deployment. In GitHub Actions these are defined under the on key.

  8. Check out code, set up Node 20+, install dependencies with npm ci, install browsers with npx playwright install --with-deps, run tests, and upload the HTML report as an artifact even on failure.

  9. A Jenkinsfile defines agent, stages and post actions. Tests run in a stage, JUnit results are published with the junit step, and reports are archived in the post always block.

  10. Docker gives a consistent environment with pinned OS, Node and browser versions, eliminating works-on-my-machine issues. Use official images like the Playwright or Cypress images, or build your own Dockerfile.

  11. Split tests across multiple machines with a matrix and the framework's shard option, e.g. --shard=1/4 in Playwright. Each shard uploads a blob report, and a final job merges them into one HTML report.

  12. Generate machine-readable (JUnit XML) and human-readable (HTML, Allure) reports, then upload them as pipeline artifacts. Traces, screenshots and videos on failure make debugging CI failures possible.

  13. Store them in the CI secret store (GitHub Secrets, Jenkins Credentials, Vault) and inject them as environment variables at runtime. Never commit them to the repo or print them in logs.

  14. Use a matrix strategy to create one job per combination of browser, OS or environment. Each job passes its matrix values to the test command, e.g. Playwright's --project flag.

  15. revert creates a new commit that undoes a previous one and is safe on shared branches. reset moves the branch pointer and can discard commits, so use it only on local work. cherry-pick copies a specific commit onto the current branch.