QA interview questions
28 questions that come up again and again in QA and SDET interviews, with short answers you can say out loud. Read the question, answer it yourself first, then open the answer.
🔍 Manual testing & test design
1. What is the difference between severity and priority?
Severity is how badly the bug hurts the product (a crash is critical). Priority is how soon it must be fixed (a typo in the company name on the home page is low severity but high priority). Testers usually set severity; the product owner sets priority.
2. What is boundary value analysis? Give an example.
Bugs cluster at the edges of valid ranges, so you test just below, on, and just above each boundary. For an age field that accepts 18–60, test 17, 18, 19, 59, 60 and 61.
3. What is the difference between smoke and sanity testing?
Smoke testing is a broad, shallow check that a new build is stable enough to test at all (does it start, can you log in). Sanity testing is a narrow, deeper check that a specific fix or change works before wider regression.
4. What is regression testing and when do you run it?
Re-running existing tests to make sure a change did not break something that worked before. Run it after bug fixes, new features, config or dependency changes, and before every release. It is the best candidate for automation.
5. What do you do when a developer says "it works on my machine"?
Give exact steps, test data, environment, browser and build version, plus a screenshot, video or console/network log. Then reproduce it together. Most of these come from a different environment, data or cache, and finding that difference is part of the bug report.
6. What makes a good test case?
One clear objective, preconditions, numbered steps, specific test data and one expected result per check. Someone new to the project should be able to run it and reach the same pass or fail decision.
🎭 Playwright automation
1. How does auto-waiting work in Playwright?
Before an action like click, Playwright waits until the element is attached, visible, stable, enabled and receiving events. Web-first assertions such as toBeVisible retry until they pass or time out. That is why fixed sleeps like waitForTimeout are not needed and make tests slow and flaky.
2. Which locators do you prefer and why?
User-facing ones first: getByRole, getByLabel, getByPlaceholder, getByText, then getByTestId for elements with no good accessible name. They survive layout and styling changes. Long CSS chains and XPath break when the DOM changes.
3. What are fixtures in Playwright Test?
Reusable setup and teardown that a test asks for by name, like page or request. You can create your own with test.extend, for example a logged-in page, a page object, or an event created through the API and deleted after the test.
4. How do you avoid logging in through the UI in every test?
A setup project logs in once (often through the API) and saves storageState to a file. Other projects depend on it and load that state, so every test starts already authenticated.
5. How do you debug a test that fails only in CI?
Turn on traces for the first retry and open the trace viewer: it shows every action, DOM snapshot, network call and console message. Also check timing, test data shared between parallel workers, screen size and environment variables.
6. How do you handle a new tab or popup?
Start waiting for the page event before the click that opens it: const popupPromise = context.waitForEvent('page'); await link.click(); const popup = await popupPromise; then wait for it to load and work with it like any page.
🔌 API testing
1. What is the difference between 401 and 403?
401 Unauthorized means you are not authenticated: no token, or an invalid or expired one. 403 Forbidden means the server knows who you are, but you are not allowed to do this.
2. What is the difference between PUT and PATCH?
PUT replaces the whole resource with the body you send. PATCH changes only the fields you send. PUT is idempotent by definition; PATCH may or may not be.
3. What does idempotent mean?
Sending the same request once or many times leaves the server in the same state. GET, PUT and DELETE should be idempotent; POST usually is not, because each call can create a new record.
4. What do you check in an API response?
Status code, response time, important headers (content type, caching), the body shape against the schema, the values against business rules, and side effects, such as whether the record really changed when you read it again.
5. Which negative tests would you write for a POST endpoint?
Missing required fields, wrong data types, values outside boundaries, invalid formats (email, date), duplicates, very long strings, no token or an expired token, another user's ID, and an unsupported method or content type.
6. How do you test an API that needs a token?
Call the login endpoint first, save the token in a variable, and send it in the Authorization header as Bearer <token>. In Postman use an environment variable; in code, a fixture or client that logs in once and reuses the token.
🗄️ SQL for testers
1. Why do testers need SQL?
To confirm that the UI or API really saved the right data, to find test data for a scenario, to set up or clean up data, and to investigate bugs at the source.
2. What is the difference between INNER JOIN and LEFT JOIN?
INNER JOIN returns only 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 orphans, for example users with no orders.
3. Write a query to find duplicate emails in a users table.
SELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1;
4. What is the difference between WHERE and HAVING?
WHERE filters rows before grouping. HAVING filters groups after GROUP BY, so it can use aggregate functions like COUNT or SUM.
5. How do you find the second highest salary?
SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees); Or, with ties handled: SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET 1;
🧩 Scenario questions
1. How would you test a login page?
Valid login, wrong password, unknown user, empty fields, field length and special characters, case sensitivity, password masking, lockout after failed attempts, "remember me", forgot password, session timeout, back button after logout, SQL injection and XSS in fields, HTTPS, and keyboard and screen reader use.
2. You have one day to test a release. What do you do?
Ask what changed and what is riskiest. Run a smoke test, then test the changed areas and the flows that make money or would hurt users most (sign-up, login, checkout). Run the automated regression in parallel, and report clearly what was and was not covered.
3. How would you test a pen?
Clarify the requirements first (who uses it, for what). Then functional (does it write, on which surfaces, how long), usability (grip, cap, clip), durability (drops, heat, cold), safety (non-toxic ink, cap choking hazard), and performance (ink flow at angles). The point is structured thinking, not a fixed list.
4. A bug you reported is rejected as "not a bug". What do you do?
Re-check it against the requirement or acceptance criteria. If it is still unclear, explain the user impact with evidence and ask the product owner to decide. If it is accepted as expected behaviour, close it and suggest updating the documentation.
5. A test passes sometimes and fails sometimes. What do you do?
Treat it as a real bug until proven otherwise. Re-run it with traces, look for timing issues, shared test data, order dependence or environment problems. Fix the cause (proper waits, isolated data). Quarantine it only while it is being fixed, never just add retries and forget it.
Read the full list of 40 QA interview questions, from testing basics to automation frameworks.
40 QA interview questionsInterviewers often ask you to find bugs live. Try the bug hunts and write up what you find.
Open the practice apps