API Testing and CI/CD Interview Questions for Automation Testing
40 API Testing and CI/CD questions with answers for automation testing roles — 10 easy, 18 medium, 12 hard.
About API Testing and CI/CD
Covers HTTP methods, status codes, REST principles, authentication, mocking, contract testing and how tests fit into CI/CD pipelines with Docker and quality gates. Modern automation roles expect you to test below the UI and to own how tests run on every commit, so this topic often separates good candidates from average ones.
Common HTTP status codes?
Show answer
What is JSON and how is it used in API testing?
Show answer
What do HTTP status codes 200, 201, 400, 401, 403, 404 and 500 mean?
Show answer
What is API testing and why is it done before UI testing?
Show answer
What is the test pyramid and how does it guide automation?
Show answer
What is the difference between continuous delivery and continuous deployment?
Show answer
What is shift-left testing?
Show answer
What is a smoke test versus a sanity test in a pipeline?
Show answer
What are stubs, mocks, fakes and spies in testing?
Show answer
POST vs PUT vs PATCH?
Show answer
What is a webhook and how do you test it?
Show answer
How do you test an API that depends on another service that is down?
Show answer
What is Docker and how does it help tests?
Show answer
What is OAuth 2.0 in API testing?
Show answer
What is CI/CD and why does automation need it?
Show answer
What is contract testing?
Show answer
What is the difference between SOAP and REST?
Show answer
What is Postman and how do you automate with it?
Show answer
What is idempotency in REST APIs and why does it matter for testing?
Show answer
What is a quality gate in a CI/CD pipeline?
Show answer
Which tests should run at each stage of a CI/CD pipeline?
Show answer
How do you mock an external API in automation tests?
Show answer
How do you run Selenium tests in Docker containers in CI?
Show answer
Tests pass on QA but fail in the staging pipeline. How do you investigate?
Show answer
How would you test an API with rate limiting?
Show answer
Describe a time you convinced developers to fix a problem found by automation.
Show answer
Your CI pipeline is blocked because a downstream service needed for API tests is often down. What do you do?
Show answer
Tests pass locally but fail on Jenkins. Why?
Show answer
Explain your CI/CD pipeline for tests.
Show answer
How would you design a CI pipeline for nightly regression?
Show answer
How do you reduce flakiness in a CI pipeline?
Show answer
What is consumer-driven contract testing with Pact?
Show answer
How do you test API security basics as an automation tester?
Show answer
How do you manage test environments for a CI pipeline?
Show answer
A third-party payment API is slow and makes your tests time out in CI. What do you do?
Show answer
How do you test GraphQL APIs compared with REST?
Show answer
What metrics do you track for test automation in CI/CD?
Show answer
How do you test an API that supports multiple versions at the same time?
Show answer
Your pipeline runs the full test suite on every commit, even for documentation-only changes. How do you optimise it?
Show answer
Frequently asked questions
How important is API Testing and CI/CD in Automation Testing interviews?
Covers HTTP methods, status codes, REST principles, authentication, mocking, contract testing and how tests fit into CI/CD pipelines with Docker and quality gates. Modern automation roles expect you to test below the UI and to own how tests run on every commit, so this topic often separates good candidates from average ones.
How should I use the API Testing and CI/CD sheet?
Go top to bottom — easy to hard. Answer before opening each answer, tick what you solved and save misses to Last-Minute Revision.