40 QA Interview Questions and Answers (Manual, Automation, API)
These are questions I’ve been asked, or have asked candidates, for QA and SDET roles. The answers are short on purpose. In an interview, give the core idea first, then add an example from your own work.
Testing fundamentals
1. What is the difference between QA, QC and testing?
QA (quality assurance) is about the process: preventing defects through standards, reviews and good practices. QC (quality control) is about the product: finding defects in what was built. Testing is the main QC activity: running the software to find bugs and check requirements.
2. What is the difference between verification and validation?
Verification asks “Are we building the product right?”, and is done with reviews, walkthroughs and static checks. Validation asks “Are we building the right product?”, and is done by running the software against what users need.
3. Explain the STLC.
The software testing life cycle has six phases: requirement analysis → test planning → test case design → test environment setup → test execution → test closure. Each phase has entry and exit criteria.
4. What is the difference between functional and non-functional testing?
Functional testing checks what the system does: features and business rules. Non-functional testing checks how well it does it: performance, security, usability, accessibility and reliability.
5. What is the difference between smoke and sanity testing?
Smoke testing is a quick, broad check that a new build is stable enough to test at all. Can you log in, and do the main pages load? Sanity testing is a narrow, deep check of one area after a fix or small change.
6. What is regression testing?
Re-testing existing features after a change, to make sure nothing that used to work is now broken. It’s the best candidate for automation, because it repeats on every release.
7. What is the difference between retesting and regression testing?
Retesting confirms that a specific bug is fixed, using the same steps. Regression testing checks that the fix didn’t break anything else.
8. What is exploratory testing?
Learning, designing and running tests at the same time, without scripted cases, usually in a time-boxed session with a charter such as “Explore checkout with expired cards for 45 minutes.” It finds bugs that scripted tests miss.
9. What is the difference between black box, white box and grey box testing?
Black box testing uses no knowledge of the code, only inputs and outputs. White box testing is based on the code’s structure, such as statements and branches. Grey box testing uses some internal knowledge, such as the database schema or API contracts, to design better black-box tests.
10. What is the test pyramid?
Many fast unit tests at the bottom, fewer API/integration tests in the middle, and a small number of slow UI/E2E tests at the top. Test each rule at the lowest level that can catch it.
Test design
11. What is boundary value analysis?
Testing at the edges of valid ranges, because off-by-one errors live there. For a 1–10 field you test 0, 1, 10 and 11 (or 0, 1, 2, 9, 10, 11 with the 3-value version). Try it with the boundary value calculator.
12. What is equivalence partitioning?
Splitting inputs into groups that should behave the same, and testing one value from each group. For age 18–65 the groups are below 18, 18 to 65, and above 65.
13. What is decision table testing?
A table of every combination of conditions and the expected action for each. It’s ideal for business rules such as “discount if member AND order > $100 OR coupon valid.”
14. What is state transition testing?
Testing how a system moves between states. An order, for example, goes created → paid → shipped → delivered, or created → cancelled. You test valid transitions, and that invalid ones (shipping a cancelled order) are blocked.
15. What makes a good test case?
A clear title, preconditions, specific steps and test data, one expected result per check, and traceability to a requirement. Another tester should be able to run it and get the same result.
16. How do you decide what to test when time is short?
Use risk-based testing. Rank features by business impact and likelihood of failure, test the high-risk areas and recent changes first, run the smoke suite, and report clearly what was not tested.
Defects
17. Explain the bug life cycle.
New → Assigned → Open → Fixed → Retest → Verified → Closed. Side paths: Rejected, Duplicate, Deferred, Not reproducible, and Reopened if the retest fails.
18. What is the difference between severity and priority?
Severity is the impact of the bug. Priority is the urgency of fixing it. A misspelled company name on the homepage is low severity but high priority. A crash in a rarely used old report is high severity but low priority.
19. What goes into a good bug report?
A specific title, environment, preconditions, numbered steps, expected vs actual result, severity, and evidence (a screenshot, video or logs). See how to write a good bug report.
20. A developer says “it works on my machine”. What do you do?
Compare environments (build, browser, data, configuration, feature flags), reproduce it together on a call or in a shared environment, and add whatever was missing to the report. Stay factual: the goal is to find the difference, not to win the argument.
Automation
21. What should and shouldn’t be automated?
Automate stable, repetitive, high-value checks: regression, smoke, data-driven cases, and API contracts. Don’t automate one-off checks, features that change constantly, or usability and visual judgement.
22. What is the Page Object Model?
A design pattern where each page or component is a class that holds its locators and actions. Tests call methods like loginPage.login(user) instead of using selectors directly, so a UI change means one fix in one place.
23. How do you handle flaky tests?
Find the cause instead of adding retries: timing (use auto-waiting or explicit waits, never fixed sleeps), shared test data (make each test create its own), test order, or environment problems. Quarantine the test while you fix it.
24. Why should you avoid Thread.sleep or waitForTimeout?
Fixed waits are too long when the app is fast, which makes the suite slow, and too short when the app is slow, which makes tests flaky. Wait for a condition, such as an element being visible or a response arriving.
25. What locator strategy do you prefer?
User-facing and stable locators first: a test ID, then role and accessible name, then label or placeholder. CSS by ID comes next, and XPath and styling classes are a last resort, because they break when the layout changes.
26. Playwright or Selenium, and why?
For a new web project, Playwright: auto-waiting, built-in runner, trace viewer and API testing. For an existing Java suite, mobile through Appium, or a large browser grid, Selenium. See the full Playwright vs Selenium comparison.
27. How do you manage test data in automation?
Create it through the API in setup, make it unique (timestamps or random suffixes), and delete it in teardown. Never depend on data another test created, or on absolute record counts.
28. How do you run tests in CI?
On every pull request: install, run a smoke subset in parallel, with retries only in CI, and upload the HTML report and traces as artifacts. Run the full regression suite nightly or before a release.
API testing
29. What do you check in an API test?
The status code, the response body and its schema, important field values, headers (content type, caching), error format, response time, and side effects, such as whether the record was really created.
30. Explain common HTTP status codes.
200 OK, 201 Created, 204 No Content · 400 Bad Request, 401 Unauthorized (no or invalid credentials), 403 Forbidden (valid credentials, but no permission), 404 Not Found, 409 Conflict, 422 Unprocessable Entity, 429 Too Many Requests · 500 Internal Server Error, 502/503 when the server or a gateway is down.
31. What is the difference between PUT and PATCH?
PUT replaces the whole resource. PATCH updates only the fields you send. PUT is idempotent: sending the same request twice gives the same result.
32. What is the difference between 401 and 403?
401 means “I don’t know who you are”: the token is missing, invalid or expired. 403 means “I know who you are, but you’re not allowed to do this.”
33. How do you test authentication on an API?
Send no token, an invalid token, an expired token, and another user’s token. Then check that one user can’t read or change another user’s records by changing an ID in the URL (an IDOR check).
34. What is contract testing?
Checking that an API’s request and response formats match an agreed schema, for example an OpenAPI or JSON schema, so the consumer and the provider don’t break each other when either side changes.
SQL and data
35. Write a query to find duplicate emails in a users table.
SELECT email, COUNT(*) AS total
FROM users
GROUP BY email
HAVING COUNT(*) > 1;
36. What is the difference between INNER JOIN and LEFT JOIN?
INNER JOIN returns only the rows that match in both tables. LEFT JOIN returns every row from the left table, with NULLs where the right table has no match. LEFT JOIN is useful for finding orphan records, such as bookings with no event.
Scenario questions
37. How would you test a pen? (Or a lift, or a vending machine?)
The interviewer wants to see your structure, not a list. Ask about requirements first, then cover functional, boundary, negative, usability, performance, durability and safety cases, and say which you’d test first and why.
38. A critical bug is found an hour before release. What do you do?
Confirm it and gather evidence, assess its impact and any workaround, and inform the release owner immediately with facts. The decision to fix, delay or ship with a known issue belongs to the business. Your job is to make the risk clear.
39. You have no requirements. How do you test?
Learn from what exists: the product itself, similar products, old tickets, developers, support staff and users. Run exploratory sessions, write down your assumptions, and get them confirmed.
40. How do you measure test quality?
Use requirement coverage, defects found before release compared with after it (defect leakage), how long it takes to give feedback on a change, and the flaky-test rate. Avoid counting test cases on its own: 1,000 weak tests are worth less than 100 good ones.
Want to practise with real tools? Write test cases with the boundary value calculator, and log your findings with the bug report generator. Interviewers love candidates who can show their own work.
FAQ
How should I prepare for a QA interview?
Revise the basics (types of testing, test design techniques, bug life cycle), prepare two or three stories from real projects in the situation-action-result format, and be ready to write a small automated test or an API check live.
What do interviewers look for in a QA engineer?
How you think about risk, how clearly you communicate bugs, and whether you can automate sensibly. Tool names matter less than explaining why you would test something a certain way.