HireHireInterview Quizzes › QA / Test Engineer

QA / Test Engineer Interview Questions

Think you're ready? These are the questions that actually decide QA / Test Engineer interviews. Warm up on Easy — then face the Hard round, where 95% of candidates crumble. 30 questions across 3 levels, instant score, completely free.

30Questions
3Difficulty levels
95%Fail the hard round
FreeInstant score
Easy
Warm-up · 10 Qs
Medium
Practical · 10 Qs
Hard
Brutal · 10 Qs
⚡ Take the QA / Test Engineer quiz — get your score →

The QA / Test Engineer interview questions

Below are the real questions, grouped by difficulty. Expand any one to reveal the correct answer and why — or take the timed quiz for a score you can share. Can you clear the Hard round?

Easy round 10 questions

What is the primary purpose of a test case's 'precondition'?
  • A. The expected result after execution
  • B. The state the system must be in before the test steps can run ✓
  • C. The steps a tester performs during the test
  • D. The defect ID linked to the test
Correct answer: B. A precondition defines the required system state or setup that must exist before the test steps are executed.
In the software test life cycle, which activity comes immediately BEFORE test execution?
  • A. Test planning
  • B. Requirement analysis
  • C. Test case design and environment setup ✓
  • D. Defect closure
Correct answer: C. Test cases must be designed and the test environment prepared before execution can begin.
What does 'regression testing' verify?
  • A. That new code changes have not broken existing functionality ✓
  • B. That the application meets performance benchmarks
  • C. That the UI matches the design mockups
  • D. That the system handles peak user load
Correct answer: A. Regression testing re-runs existing tests to confirm that recent changes have not introduced defects in previously working features.
A field accepts ages from 18 to 60. Using boundary value analysis, which set of values is most appropriate to test the lower boundary?
  • A. 1, 18, 100
  • B. 17, 18, 19 ✓
  • C. 0, 30, 61
  • D. 18, 40, 60
Correct answer: B. Boundary value analysis tests values just below, at, and just above the boundary, which for the lower limit of 18 are 17, 18, and 19.
What distinguishes 'severity' from 'priority' in defect reporting?
  • A. Severity is set by developers; priority is set by testers
  • B. Severity is the technical impact of the defect; priority is the urgency of fixing it ✓
  • C. They are identical terms used interchangeably
  • D. Severity applies only to UI bugs; priority applies only to backend bugs
Correct answer: B. Severity reflects the impact of a defect on the system, while priority reflects how urgently it needs to be fixed from a business standpoint.
Which HTTP status code indicates that a requested resource was not found?
  • A. 200
  • B. 301
  • C. 404 ✓
  • D. 500
Correct answer: C. HTTP status code 404 specifically indicates that the requested resource could not be found on the server.
In Selenium WebDriver, what is the main advantage of an explicit wait over a static Thread.sleep()?
  • A. It always waits the full timeout duration
  • B. It waits only until a specific condition is met, then proceeds ✓
  • C. It pauses the entire test suite globally
  • D. It requires no locator to function
Correct answer: B. An explicit wait polls for a defined condition and continues as soon as it is met, avoiding the fixed delay of Thread.sleep().
Which SQL clause is used to filter grouped rows based on an aggregate condition?
  • A. WHERE
  • B. HAVING ✓
  • C. ORDER BY
  • D. GROUP BY
Correct answer: B. HAVING filters groups after aggregation, whereas WHERE filters individual rows before grouping.
What is the defining characteristic of a 'smoke test'?
  • A. An exhaustive test of every feature and edge case
  • B. A quick check that the build's critical functions work before deeper testing ✓
  • C. A test focused solely on database integrity
  • D. A test measuring maximum system throughput
Correct answer: B. A smoke test is a shallow, broad check confirming that the build is stable enough for further detailed testing.
In the Page Object Model design pattern, what is stored in a page class?
  • A. Test assertions and expected results
  • B. The web element locators and methods to interact with a page ✓
  • C. The CI/CD pipeline configuration
  • D. The test data for all test cases
Correct answer: B. A Page Object encapsulates a page's element locators and interaction methods, separating them from test logic for maintainability.

Medium round 10 questions

A login form has a password field that must accept 8 to 16 characters. Using boundary value analysis, which set of input lengths is the MOST efficient to test the field's length validation?
  • A. 8, 12, and 16 characters
  • B. 7, 8, 16, and 17 characters ✓
  • C. 1, 8, and 100 characters
  • D. 8, 9, 10, 11, 12, 13, 14, 15, and 16 characters
Correct answer: B. Boundary value analysis targets the values just below, at, and just above each boundary (7/8 and 16/17), which is where off-by-one defects typically occur.
You find that a 'Submit Order' button occasionally does nothing on the first click but works on the second. What is the BEST first step before logging this as a bug?
  • A. Log it immediately as intermittent and move on
  • B. Determine reproducible steps and note frequency/conditions under which it fails ✓
  • C. Assume it is a network issue and close it as not-a-bug
  • D. Ask a developer to fix it without documenting anything
Correct answer: B. A good bug report needs consistent, documented reproduction steps and observed frequency so developers can diagnose intermittent issues effectively.
In a REST API test, you send a POST to create a resource and it succeeds. Which HTTP status code should you typically assert in the response?
  • A. 200 OK
  • B. 201 Created ✓
  • C. 204 No Content
  • D. 302 Found
Correct answer: B. A successful resource creation via POST conventionally returns 201 Created, often with the new resource or its location in the response.
Your Selenium test intermittently fails with 'element not found' even though the element eventually appears. What is the correct fix?
  • A. Add a fixed Thread.sleep(5000) before every interaction
  • B. Use an explicit wait (WebDriverWait) for the element's expected condition ✓
  • C. Increase the browser window size
  • D. Re-run the test until it passes
Correct answer: B. Explicit waits poll for a specific condition and proceed as soon as it is met, making tests reliable without the wasted time or fragility of fixed sleeps.
A tester writes: 'Given the user is logged in, When they click Logout, Then they are redirected to the login page.' This format is most associated with which practice?
  • A. Boundary value analysis
  • B. Behavior-Driven Development (BDD) / Gherkin ✓
  • C. Exploratory testing charters
  • D. Equivalence partitioning
Correct answer: B. The Given-When-Then structure is the Gherkin syntax used in BDD to describe scenarios in a readable, executable format.
You are asked to test a 'transfer money' feature. Which of these is a NEGATIVE test case?
  • A. Transfer 100 from an account with a 500 balance
  • B. Transfer an amount greater than the available balance ✓
  • C. Transfer 1 to a valid recipient
  • D. Transfer the full available balance to a valid recipient
Correct answer: B. A negative test deliberately supplies invalid input (insufficient funds) to verify the system rejects it gracefully rather than testing a valid, expected flow.
During regression testing after a small bug fix in the checkout module, what is the primary goal?
  • A. To verify only the exact line of code that was changed
  • B. To confirm the fix works and that existing related functionality still works ✓
  • C. To test brand-new features added in the release
  • D. To measure the application's performance under load
Correct answer: B. Regression testing verifies that a change fixed the issue without breaking previously working functionality in related areas.
In a CI pipeline, your automated test suite passes locally but a test fails only on the CI server. What is the MOST likely cause to investigate first?
  • A. The CI server has a faster CPU
  • B. Environment differences such as test data, timezone, config, or missing dependencies ✓
  • C. The test code is syntactically invalid
  • D. The programming language version is identical on both
Correct answer: B. Tests that pass locally but fail in CI most commonly stem from environment discrepancies like data state, configuration, locale, or dependency versions.
You need to verify that a user's order total is correctly stored after checkout. Which testing approach directly validates this?
  • A. Checking only the UI confirmation message
  • B. Querying the database to confirm the persisted total matches the expected value ✓
  • C. Reviewing the CSS of the confirmation page
  • D. Measuring the page load time
Correct answer: B. Database validation confirms data is actually persisted correctly, which the UI alone may not guarantee due to caching or display-only formatting.
You want to ensure a critical API endpoint returns results within acceptable time under 200 concurrent users. Which test type is appropriate?
  • A. Unit testing
  • B. Load testing ✓
  • C. Usability testing
  • D. Smoke testing
Correct answer: B. Load testing evaluates system behavior and response times under an expected concurrent user load to confirm performance requirements are met.

Hard round 10 questions

In a TestNG suite configured with parallel="methods" and thread-count=5, tests intermittently interact with the wrong browser window and throw NoSuchWindowException, though each test passes when run alone. The framework holds `private static WebDriver driver;` initialized in a @BeforeMethod. What is the correct root-cause fix?
  • A. Store the WebDriver in a `ThreadLocal<WebDriver>` so each thread gets its own isolated instance ✓
  • B. Add an implicit wait of 10 seconds so window handles have time to stabilize across threads
  • C. Change parallel="methods" to parallel="tests" and keep the static driver
  • D. Synchronize every @Test method on the driver object to serialize browser access
Correct answer: A. A single static WebDriver is shared across all threads, so parallel tests clobber each other's session; a ThreadLocal gives each thread its own driver, which is the standard thread-safe pattern.
A Selenium test intermittently fails with ElementNotInteractableException when clicking a 'Confirm' button inside an animated modal. The wait is `new WebDriverWait(driver, Duration.ofSeconds(10)).until(ExpectedConditions.presenceOfElementLocated(By.id("confirm")))`. Why does this fail and what is the minimal fix?
  • A. presenceOfElementLocated returns as soon as the node exists in the DOM even if it is hidden or still animating; switch to elementToBeClickable ✓
  • B. The timeout is too short; increase it to 30 seconds so the animation completes
  • C. presenceOfElementLocated polls too aggressively; add a Thread.sleep(500) before the click
  • D. The locator is stale; re-find the element with driver.findElement immediately before clicking
Correct answer: A. presenceOfElementLocated only guarantees DOM presence, not visibility or interactability, so the click can hit a not-yet-interactable element; elementToBeClickable waits for visible and enabled.
A test grabs `WebElement row = driver.findElement(By.css(".grid-row"))`, triggers a filter that causes React to re-render the grid, then calls `row.click()` and gets StaleElementReferenceException. Which statement correctly explains the cause?
  • A. The element reference points to a DOM node that was detached/replaced during re-render, so the cached handle is no longer valid ✓
  • B. The CSS selector matched multiple elements, so Selenium lost track of which one to click
  • C. An implicit wait expired between findElement and click, invalidating the reference
  • D. The browser garbage-collected the element because JavaScript held no reference to it
Correct answer: A. StaleElementReferenceException means the previously located node was removed or replaced in the DOM; the fix is to re-locate the element after the re-render rather than reuse the cached reference.
You migrate a click test from Selenium to Playwright. In the app, a cookie banner sometimes overlays the target button. With Selenium's Actions.click the test occasionally clicked the banner instead of the button; in Playwright `page.click('#submit')` now times out with an actionability error instead. Why does Playwright behave differently?
  • A. Playwright's auto-waiting runs actionability checks including that the element actually receives pointer events (is not obscured), so it waits/fails rather than clicking the overlay ✓
  • B. Playwright disables JavaScript overlays during clicks, so the banner should never appear
  • C. Playwright uses a longer default timeout, so the banner has time to auto-dismiss before the click
  • D. Playwright clicks via the accessibility tree, which ignores z-index and overlays entirely
Correct answer: A. Playwright's actionability checks require the target to be visible, stable, enabled, and hit-testable (receiving events); an obscuring overlay fails the hit-test, producing a timeout instead of a wrong-element click.
A data-validation check runs `SELECT * FROM orders WHERE customer_id NOT IN (SELECT id FROM customers);` to find orphaned orders. The customers table has at least one row where id IS NULL. What does the query return?
  • A. Zero rows, regardless of how many orphaned orders actually exist ✓
  • B. All orphaned orders correctly, because NULL ids are simply skipped in the subquery
  • C. A syntax error, because NOT IN cannot operate on a nullable column
  • D. Only orders whose customer_id is also NULL
Correct answer: A. With NOT IN, a NULL in the subquery makes every comparison evaluate to UNKNOWN rather than TRUE, so the predicate is never satisfied and no rows are returned; NOT EXISTS or filtering out NULLs avoids this trap.
An SLA states 95% of checkout requests must complete under 500ms. Your k6 run reports http_req_duration avg=210ms, med=180ms, p(95)=830ms, max=4s. What is the correct conclusion for the release gate?
  • A. Fail the gate: the p95 of 830ms exceeds the 500ms threshold, and the low average masks a slow tail ✓
  • B. Pass the gate: the average and median are well under 500ms
  • C. Pass the gate: only the max is over 500ms and maximums are always outliers to ignore
  • D. Inconclusive: k6 cannot evaluate percentile-based SLAs without a longer soak test
Correct answer: A. A 95th-percentile SLA is evaluated against p95, which at 830ms violates the 500ms limit; averages and medians hide tail latency and must not be used to certify a percentile SLA.
In WireMock, two stub mappings both match GET /accounts/123: stub A has `"priority": 5` returning 200, stub B has `"priority": 1` returning 404. Which response is served, and why?
  • A. The 404 from stub B, because a lower priority number means higher precedence and is evaluated first ✓
  • B. The 200 from stub A, because higher priority numbers win
  • C. WireMock returns a 500 because ambiguous overlapping stubs are a configuration error
  • D. Whichever stub was registered last, because priority only breaks ties by insertion order
Correct answer: A. In WireMock a lower priority value denotes higher precedence, so stub B (priority 1) is matched before stub A and its 404 is returned.
A consumer service publishes a Pact contract expecting the provider's GET /user/{id} response to include a non-null `email` string. The provider team refactors and drops `email` from the payload. Assuming CI runs Pact provider verification against the published pact, what happens and why?
  • A. Provider verification fails, because the recorded consumer expectation (email present) is no longer satisfied by the real provider response ✓
  • B. Nothing fails, because Pact only verifies request shapes, not response bodies
  • C. The consumer's own unit tests fail, but provider verification passes since it replays stubs
  • D. Verification passes because Pact treats missing fields as backward-compatible by default
Correct answer: A. Provider verification replays the consumer's recorded expectations against the real provider; removing a field the consumer relied upon breaks that expectation and fails verification, catching the contract mismatch before deploy.
A field accepts an integer age and is valid only for 18 through 65 inclusive. Applying two-value boundary value analysis (just below, at, above each boundary), which set of test inputs is correct?
  • A. 17, 18, 65, 66 ✓
  • B. 18, 19, 64, 65
  • C. 0, 18, 65, 100
  • D. 17, 19, 64, 66
Correct answer: A. Two-value BVA tests each boundary and its immediate outside neighbor: min-1=17, min=18, max=65, max+1=66.
A configuration form has 3 independent boolean flags (each on/off). Exhaustive testing needs 2^3 = 8 cases, but you decide pairwise (all-pairs) coverage is sufficient. What is the minimum number of test cases that covers every pair of flag values?
  • A. 4 ✓
  • B. 3
  • C. 6
  • D. 8
Correct answer: A. For three two-valued parameters, an orthogonal all-pairs set of 4 cases covers every pairwise value combination, halving the exhaustive 8.

Prep for another role

Questions are original, written and independently verified for HireHire's role interview quizzes. They reflect the kind of knowledge QA / Test Engineer interviews test, not any specific company's questions. HireHire maps live tech & IT jobs across India, updated regularly. Last updated: July 2026.