End-to-End Testing Interview Questions — Test Automation Practice Quiz
Reviewed by Mark Dickie · Last updated
14 questions on this page you can answer and see marked on the spot. Go to the first one
End-to-end (E2E) testing is a test level that exercises a full application flow from the user interface down to the database and back, simulating how a real user would interact with the system. For interview preparation, you should know how E2E tests differ from unit and integration tests, why they tend to be slower and more brittle, and what strategies reduce flakiness. You should also be comfortable with common E2E frameworks, the role of test pyramids, and how to gate E2E suites inside a CI/CD pipeline.
E2E tests sit at the top of the test pyramid: they are the fewest in number but the most expensive to run and maintain. Interviewers often probe whether you can justify when to write an E2E test versus a cheaper unit or integration test, and how you keep the suite from becoming a bottleneck.
| Test Level | Scope | Speed | Typical Count | Flakiness Risk |
|---|---|---|---|---|
| Unit | Single function or class | Milliseconds | Hundreds to thousands | Low |
| Integration | Modules or services together | Seconds | Tens to hundreds | Medium |
| End-to-End | Full user journey through the UI | Seconds to minutes | Small handful | High |
What does an E2E testing interview actually test?
Most E2E interview questions fall into four areas: framework knowledge, flakiness management, test design, and CI integration. A strong answer shows you understand the trade-offs, not just the API of a specific tool.
- Framework and selector strategy — how you locate elements (CSS, XPath, role-based selectors), handle waits (explicit vs implicit), and structure page objects or app actions.
- Flakiness causes and fixes — dealing with timing, async loading, dynamic IDs, test pollution, and retries. Be ready to explain why retries mask problems instead of fixing them.
- Test design and coverage — deciding which user journeys to automate end-to-end, how to keep data deterministic with fixtures or seeding, and when to split a large test into smaller ones.
- CI and pipeline integration — running E2E suites on every PR versus nightly, parallelizing across workers, recording video and traces on failure, and gating merges on the results.
How do you keep an E2E suite maintainable?
The core ideas are isolation, determinism, and fast feedback. Each test should set up its own data and tear it down, so order does not matter. Selectors should target stable attributes like roles and labels, not brittle CSS classes generated by a build step. And the suite should run in parallel where possible, with a clear way to debug failures through screenshots, traces, or video recordings.
Key facts
- Tarmac has 29 Test Automation interview questions on this topic, 25 of them on this page, at difficulty 1–5 of 5.
- Tarmac tracked 782 job postings asking for Test Automation in September 2026.
- Roles asking for Test Automation advertise a median base salary of £71,250, across 166 job postings as of September 2026.
- Tarmac last reviewed these Test Automation interview questions on 14 October 2026.
At a glance
| Questions | 25 shown · 29 in the bank |
|---|---|
| Difficulty | 1–5 of 5 |
| Formats | True / false, Short answer, Multiple choice, Ordering, Fill in the blank, Flashcard |
What you'll review
- end to end testing
Practice questions
Try one before you open the answer. Pick an option and press Check; it's marked on the spot.
True or false: End-to-end tests are typically faster to execute than unit tests because they exercise the entire application in a single test case.#
Options
Show answer
End-to-end tests are typically much slower to execute than unit tests, so the claim is false. They drive the full stack through UI, APIs, databases, and external services that need real or simulated environments, while unit tests run in-process without external dependencies and finish in milliseconds. Exercising the whole application in one test adds cost rather than speed.
The statement is false. End-to-end tests are generally much slower than unit tests because they interact with multiple layers (UI, APIs, databases, external services) and need real or simulated environments. Unit tests run in-process with no external dependencies, so they finish in milliseconds. Covering the whole application in one test adds execution cost rather than reducing it, so the speed relationship is reversed.
What is the primary purpose of end-to-end (E2E) testing?#
Show answer
To validate a complete, real-world user workflow through the entire application, including all integrated components and external dependencies, from start to finish, verifying that the system behaves correctly as a whole.
End-to-end testing sits at the top of the test pyramid and exercises the full application stack the way a real user would. Its primary purpose is to confirm that all integrated parts (UI, services, databases, external APIs) work together correctly across a complete business flow. Unit tests isolate individual functions, and performance or load tests measure throughput under stress, so neither of those is the purpose of E2E testing.
Which statement best describes what distinguishes an end-to-end (E2E) test from a typical integration test in an automated test suite?#
Options
Show answer
An end-to-end test exercises the whole application from a user-facing entry point through every layer, including real databases and external dependencies, to verify a complete workflow. An integration test checks that two or more components work together, often with some dependencies mocked or stubbed, so its scope is narrower.
The key distinction is scope. An E2E test starts from an external entry point such as the browser or an HTTP request, drives the full system including real dependencies, and validates the complete user workflow. An integration test verifies that specific components or layers work together correctly, typically replacing some external dependencies with mocks or stubs, so it does not cover the full path from input to final output. The option describing a single function with all dependencies mocked reverses the two definitions, the option claiming identical scope ignores the difference in what is exercised, and the option limiting E2E to schema checks and integration to UI rendering misassigns both test types.
Which of the following describes what end-to-end (E2E) testing validates?#
Options
Show answer
End-to-end (E2E) testing validates a complete user workflow through the entire application stack, including the frontend, backend, databases, and external integrations. It simulates real user scenarios from start to finish, which distinguishes it from unit tests of isolated functions and integration tests of component interfaces.
End-to-end testing validates an entire application flow from start to finish, simulating real user scenarios across all integrated components, databases, and external services, so the option describing a complete user workflow through the whole stack, including external integrations, is correct. The other choices describe other test levels or activities: testing individual functions in isolation with mocked dependencies is unit testing, checking component interfaces through their API contracts is integration/API testing, and verifying that the CI/CD pipeline builds and deploys artifacts is pipeline validation, all of which have a narrower scope.
True or false: end-to-end tests exercise the application through its complete deployed stack, the way a real user would, rather than testing individual components in isolation.#
Options
Show answer
The statement is true: end-to-end tests exercise the fully deployed application as a real user would, across its interface, backend services, and database. Unit and integration tests isolate components or subsets, while end-to-end tests cover the complete system.
End-to-end testing drives the fully deployed application through its user-facing interface, so the tested path runs across the whole stack, including backend services and the database. Unit and integration tests, by contrast, isolate single components or subsets of the system. The statement therefore describes the defining property of end-to-end tests and is true.
Order these test levels from narrowest scope (testing the smallest unit of code) to broadest scope (testing the complete user journey).#
Put these in order
Show answer
Unit testing, then integration testing, then end-to-end testing is the order from narrowest to broadest scope. Unit tests check the smallest code units in isolation, integration tests check how modules work together, and end-to-end tests exercise a complete user journey through the whole application.
Unit testing exercises the smallest individual code units, usually in isolation. Integration testing widens the scope to check how several units or modules work together. End-to-end testing is the broadest level, driving the whole application through a complete user journey. Each level adds more of the system to the scope, so the order runs from unit to integration to end-to-end.
In end-to-end testing, the application is tested as a whole to validate the complete _____ from _____ to finish.#
Show answer
In end-to-end testing, the application is tested as a whole to validate the complete workflow from start to finish.
End-to-end testing validates the complete application workflow, flow, or journey from start (or beginning) to finish, treating the system as a whole rather than testing individual components in isolation. The first blank accepts 'workflow', 'flow', or 'journey' — all standard synonyms in end-to-end testing definitions — and the second blank accepts both 'start' and 'beginning', since 'from start to finish' and 'from beginning to end' are equally idiomatic.
In test automation, what do end-to-end (E2E) tests primarily validate that unit and integration tests typically do NOT?#
Show answer
E2E tests primarily validate that the complete user journey works across the entire application stack, including the UI, backend services, database, and external dependencies, exactly as a real user would experience it.
Unit tests isolate and verify individual functions, and integration tests verify interactions between pairs or small groups of modules. End-to-end tests exercise the full path a real user takes, from the UI through the backend services, the database, and external APIs, to confirm the system delivers the expected business outcome as a whole. The key differentiator is coverage of the complete user journey across the real stack, not just faster execution or deeper function-level checks.
In the test automation pyramid, end-to-end tests should form the largest layer of the test suite.#
Options
Show answer
End-to-end tests should not be the largest layer in the test automation pyramid. They sit at the top as the smallest tier because they are slow, costly to run and maintain, and prone to flakiness. The broad base should be fast unit tests, with integration tests in the middle.
The test pyramid places end-to-end tests at the top as the smallest tier. They are the slowest, most expensive to run and maintain, and most brittle, because they depend on the full stack and external services and often fail for environment reasons unrelated to the code under test. The largest base should be fast, stable unit tests, with integration tests in the middle. End-to-end tests are kept to a small number of critical user journeys.
Order the four standard phases of an automated end-to-end test from first to last.#
Put these in order
Show answer
An automated end-to-end test runs its phases in this order: Arrange sets up preconditions and test data, Act launches the application and performs user interactions, Assert verifies the expected outcome, and Teardown cleans up test data and closes resources. Asserting before acting checks nothing meaningful, and teardown runs last so later tests stay isolated.
An automated end-to-end test follows the Arrange-Act-Assert pattern with a teardown step appended. Arrange comes first, setting up preconditions such as test data, user accounts, or API state so the test starts from a known baseline. Act comes second, launching the browser or client and performing the user journey under test. Assert comes third, verifying the observable outcome such as a confirmation page, a database record, or a sent email. Teardown comes last, removing persisted test data and releasing resources so later tests stay isolated and reproducible. Asserting before acting cannot check anything meaningful, and teardown must run after the assertions have finished.
Describe the main drawbacks of end-to-end tests compared to unit tests, and explain what causes them.#
Show answer
End-to-end tests exercise the whole stack (UI, backend, databases, and external services), so they run slower and are more flaky and brittle than unit tests. A failure in any layer or a third-party dependency can break the test even when the application logic is correct, which also makes them more expensive to maintain. Unit tests run in isolation and finish in milliseconds.
End-to-end tests exercise the complete stack, including the UI, backend, databases, and external services. Because a change or failure in any layer, or a flaky third-party dependency, can fail the test even when the application logic is correct, E2E tests are slower to run, more prone to flakiness, and more costly to maintain. Unit tests run in isolation and complete in milliseconds, which is the trade-off against the higher real-user confidence E2E tests provide.
End-to-end tests that rely on live external services (e.g., a real payment gateway) are more prone to _____ than tests that use mocks or stubs for those same dependencies.#
Show answer
End-to-end tests that rely on live external services (e.g., a real payment gateway) are more prone to flakiness than tests that use mocks or stubs for those same dependencies.
Live external services introduce variability (network latency, rate limits, scheduled downtime, or data changes) that can make the same test pass on one run and fail on the next with no code change, which is flakiness. Mocks or stubs replace those dependencies with deterministic responses, removing the external variability and producing stable, repeatable results. This is a core trade-off: stubbed dependencies improve reliability and speed but reduce confidence that the real integration works, which is why many teams add a small set of contract tests on top of stubbed E2E tests.
A team is building a CI pipeline for a web application with a React frontend and a REST API backed by PostgreSQL. They have 200 unit tests (about 30 seconds combined) and are adding slow, expensive end-to-end tests. They want to follow the testing model popularized by Mike Cohn in Succeeding with Agile: a large base of fast, cheap unit tests, a smaller middle layer of integration or service tests, and a small top of slow, expensive end-to-end tests. What is the standard name of this model?#
Show answer
The test pyramid, also called the testing pyramid or test automation pyramid. It stacks many fast unit tests at the base, fewer integration or service tests in the middle, and a few end-to-end tests at the top.
Mike Cohn introduced the test pyramid in Succeeding with Agile. It describes a layered distribution of automated tests: a broad base of fast, inexpensive unit tests that supply most of the coverage, a thinner middle layer of integration or service tests, and a narrow top of slow, costly end-to-end tests reserved for the most critical user flows. The shape reflects the trade-off between confidence and execution time, so that most confidence comes from cheap tests while the number of slow E2E tests stays small enough to keep CI practical.
In a healthy test automation pyramid, end-to-end (E2E) tests sit at the {{0}} of the pyramid and should be the {{1}} in quantity. Unlike unit tests, a single E2E test exercises the full system — from the {{2}} layer through the API and business logic down to the database — which makes each test slow to run and costly to maintain.#
Show answer
top / fewest / UI
In the classic test automation pyramid, E2E tests occupy the narrow apex because they are the most expensive to build, run, and maintain: each one drives the entire stack from the UI through the API and business logic to the database. Because of that high cost and slow execution, teams deliberately keep E2E coverage to a minimum — the fewest in number — while placing the bulk of coverage in fast, cheap unit tests at the base. The entry point for an E2E test is the UI (or presentation) layer, which is why these tests are sometimes called UI-level tests.
Which statement correctly describes the distinguishing characteristic of end-to-end (E2E) testing compared to integration testing?#
Options
Show answer
End-to-end (E2E) testing exercises a complete user journey through the real entry point, such as the UI, across backend services and external dependencies, simulating real user behavior from start to finish. Integration testing instead checks how a smaller set of internal modules or services interact, often with external dependencies mocked or stubbed.
E2E tests are defined by scope: they start at the real user-facing entry point and traverse every layer, including external dependencies, to validate the whole flow as a real user would experience it. Integration tests verify that specific modules or services work together correctly and commonly stub or mock external dependencies. The option describing a single class with all collaborators replaced is a unit test; the option about browsers reverses the roles, since E2E tests are the ones that typically run through a real UI; and the option about CI cadence describes when tests run, not what they cover.
True or False: In a well-balanced test suite that follows the test pyramid, end-to-end tests should form the largest portion of the suite.#
Options
Show answer
False: end-to-end tests should not form the largest portion of a well-balanced test suite that follows the test pyramid. The pyramid puts unit tests at the broad base and keeps E2E tests few at the top, because they are slow, brittle, and costly to maintain. Making them the dominant layer leads to long feedback cycles and flaky pipelines.
The test pyramid calls for a broad base of fast, isolated unit tests, a middle layer of integration tests, and a relatively small number of end-to-end tests at the top. End-to-end tests are slow, brittle, and expensive to maintain. Making them the largest layer produces long feedback cycles and flaky CI pipelines. Each E2E test gives high confidence, but they are impractical as the dominant layer, so the statement is false.
A team migrating to CI/CD decides to replace most of their unit tests with end-to-end tests, arguing that E2E tests give broader coverage and therefore make unit tests redundant. Name two primary problems this approach will create and briefly explain why each is a concern for a CI/CD pipeline.#
Show answer
Flakiness: E2E tests depend on the full system and external services, so they fail intermittently due to timing, network, or state issues, which undermines trust in the CI signal and blocks deployments unpredictably. Slow execution: E2E tests take significantly longer than unit tests because they start the full stack and interact through the UI or real endpoints, creating long feedback loops that delay developer fixes and slow every pipeline run.
The two key concerns are flakiness and slow execution speed. Flaky E2E tests produce non-deterministic failures, where the same code passes sometimes and fails at other times, which erodes confidence in the CI signal and can block merges or deployments for reasons unrelated to actual defects. Slow E2E suites create long feedback loops, delaying fixes and making every pipeline run expensive. Unit tests, being fast and deterministic, catch most logic errors quickly, so E2E tests should complement them rather than replace them.
Put the phases of a well-structured end-to-end test, following the Arrange-Act-Assert-Teardown pattern, in the order they should be executed.#
Put these in order
Show answer
The phases of a well-structured end-to-end test run in this order: Arrange, Act, Assert, Teardown. Arrange seeds preconditions and test data, Act performs the user actions through the real entry point, Assert checks outcomes and system state, and Teardown removes test data and restores a known state so other tests are unaffected.
A well-structured E2E test runs Arrange first, which sets up preconditions and seeds test data so the test starts from a known state. Act comes next and performs the user interaction under test through the real entry point. Assert follows the action and verifies the outcomes and resulting system state, since assertions before the action would check nothing new. Teardown runs last, cleaning up created data and restoring system state so later tests are not affected. Each adjacent pair has a strict precedence: you cannot act before arranging, cannot assert before acting, and should not tear down before asserting.
In a CI pipeline for a web application made of a React frontend, a Node.js API gateway, and three downstream microservices, your team has 200 browser-driven E2E tests written in Playwright that exercise the full stack through the UI. The suite takes 45 minutes and flakes about 12% of the time in CI. Which change addresses both the 45-minute runtime and the 12% flake rate by targeting their underlying cause?#
Options
Show answer
Replacing most broad full-stack Playwright E2E tests with consumer-driven contract tests at service boundaries and component tests for page interactions addresses both problems. Full-stack browser tests are slow and flaky because they depend on every service, the network, and shared test data. Keeping a thin E2E layer for the critical journey preserves real integration confidence. Retries and sharding only treat symptoms.
The runtime and flakiness both stem from verifying concerns through slow, full-stack, browser-driven tests whose outcomes depend on many services, network calls, and test data. Consumer-driven contract tests check the response shapes between the API gateway and each microservice quickly and deterministically without starting the whole stack, and component tests verify page interactions in isolation from the backend, removing the environmental variance behind the flakes. Keeping a thin E2E layer of roughly 15-25 tests for the critical journey preserves genuine end-to-end confidence that the real services integrate through the browser. Automatic retries only hide flakiness and add runtime, and sharding reduces wall-clock time while leaving the same full-stack tests flaking at the same rate. Replacing the whole suite with component tests against mocks gives up the integration coverage that only the real stack provides.
A React frontend talks to a microservices backend. Its suite has 200 Playwright end-to-end tests that take 45 minutes in CI and fail intermittently about 12% of the time. Most of the slowness and flakiness comes from broad E2E tests that cross every service boundary and exercise every UI interaction through the full stack. Describe a test-strategy refactor that reduces both the flake rate and the wall-clock time, and explain why each part of it helps.#
Show answer
Move verification to the cheapest layer that can catch each defect. First, add consumer-driven contract tests at each service boundary so that each consumer's expectations of a provider are checked quickly and deterministically without standing up the full system; the provider verifies these contracts in its own pipeline. Second, move page-level interaction coverage (forms, validation, error states, rendering of responses) into Playwright component tests that run the React components in isolation against stubbed or mocked API responses, so they do not depend on live services. Third, keep a thin layer of E2E tests covering only the few critical user journeys, such as sign-up-to-checkout, and run them against a stable, seeded environment. Because most of the 200 tests move to contract and component tests, the number of slow, upstream-sensitive paths drops sharply, which lowers both runtime and flakiness. The E2E suite can also be sharded and run in parallel on the smaller remaining set.
The refactor works because it reduces the number of broad, full-stack tests that cause both symptoms. Consumer-driven contract tests check each service interaction quickly and deterministically without running the whole system. Playwright component tests exercise page-level UI behaviour against mocked responses, so they neither wait on backend services nor inherit their instability. A thin E2E layer keeps coverage of the most important user journeys, so the remaining slow, sensitive tests are few and can be stabilised and parallelised. Together these shift coverage down the test pyramid, which reduces both wall-clock time and upstream-driven flakiness.
A web application has 200 Playwright end-to-end tests. The suite takes 45 minutes in CI, and about 12% of runs fail intermittently with tests that pass on rerun. Most tests drive the full stack through the UI to check business rules that could be verified at the service or component level. Which change reduces both the runtime and the flake rate?#
Options
Show answer
Moving most business-rule verification into consumer-driven contract tests and component tests, with a thin E2E layer for critical journeys, reduces both E2E runtime and flakiness. Fast, deterministic lower-level tests catch most defects, so fewer slow, timing-sensitive full-stack tests run in CI.
Long, flaky E2E suites come from every test driving the whole stack, so each test carries many failure points (network, timing, shared data) and runs slowly. Moving most business-rule verification into consumer-driven contract tests and component tests makes those checks fast and deterministic, and leaves a small E2E layer that covers only cross-service journeys. That shrinks both the total runtime and the number of timing-sensitive full-stack tests that can fail intermittently. Automatic retries hide flakiness and add time when tests fail, so they fix neither problem. More shards against one shared environment spread contention without removing the flaky behavior. Running E2E only nightly removes fast feedback and changes nothing about the suite itself.
A team's CI pipeline runs thousands of end-to-end browser tests that take 90 minutes to complete and flake about 15% of the time. Feature teams resist adding more. Name the well-known testing strategy that reshapes the suite to reduce these E2E-driven problems, and describe what it involves.#
Show answer
Adopt the test pyramid: restructure the suite so the majority of coverage lives in fast, deterministic unit and integration tests, and keep only a thin layer of end-to-end browser tests for critical user journeys. This reduces the number of slow, flaky E2E tests that exercise the full stack (UI, network, external services) and moves that coverage down to lower-level tests that are quicker and more reliable.
The slowness and flakiness both stem from relying heavily on end-to-end browser tests, which exercise the full stack (browser, network, external services) and therefore take long and depend on many moving parts that can fail intermittently. The test pyramid is the well-known strategy for this situation: it moves most coverage into unit and integration tests, which run faster and are more deterministic, and keeps only a thin layer of E2E tests for critical journeys. A strong answer names the pyramid and explains that the bulk of coverage shifts to lower-level tests while E2E tests are kept for critical paths.
In the classic test automation pyramid, end-to-end tests occupy the _____ layer and should represent the _____ proportion of the test suite, because they are the slowest and most expensive to maintain.#
Show answer
In the classic test automation pyramid, end-to-end tests occupy the top layer and should represent the smallest proportion of the test suite, because they are the slowest and most expensive to maintain.
In Mike Cohn's test pyramid, unit tests form the wide base (fastest, cheapest, most numerous), integration tests the middle, and end-to-end tests the narrow top (slowest, most expensive, fewest). E2E tests should be the thinnest layer because each one exercises the full stack and is costly to run and maintain.
End-to-end tests are the most appropriate test level for exhaustively verifying complex business logic with many branches, because they provide the highest confidence by exercising the full application stack.#
Options
Show answer
False. Complex business logic with many branches belongs in unit or integration tests, which are fast, deterministic, and can exhaustively cover edge cases. End-to-end tests should cover only critical user journeys and happy paths; using them for exhaustive branching creates slow, brittle, and expensive suites that are hard to maintain.
Complex business logic with many branches belongs in unit or integration tests, which run fast, are deterministic, and can cheaply cover every edge case. End-to-end tests should cover only critical user journeys and happy paths; using them for exhaustive branching creates slow, brittle, and expensive suites that are hard to maintain. The 'highest confidence' from E2E tests is about integration and system behavior, not about the correctness of individual logic paths.
In a microservices system, end-to-end tests that traverse the full request path across several independently deployed services fail falsely at a high rate because of timing dependencies between services. Which test-level strategy reduces these false failures while keeping real end-to-end coverage for the paths that matter?#
Options
Show answer
Consumer-driven contract tests plus a thin end-to-end suite is the strategy that reduces false E2E failures in microservices while keeping real coverage. Contracts check each service interface deterministically at the integration level, and a small set of E2E tests still validates critical user journeys against the real deployed topology.
Consumer-driven contract tests verify each consumer-provider interface at the integration level, deterministically and quickly, so the full E2E suite no longer needs to exercise every inter-service interaction. Keeping a thin E2E layer for critical user journeys preserves validation against real services and the real deployment topology where it adds the most confidence, while removing most of the boundary crossings that generate timing-related false failures. Converting everything to virtualized integration tests loses the guarantee that the real system works end to end, because the tests run against stubs. Retries and wait helpers hide the timing symptoms without removing the dependency that causes them. Running the same suite against a lock-step staging replica keeps the same temporal coupling between services, so the non-determinism recurs there.
Related interview questions
Job market
See test-automation salaries and hiring demand from live job postings.
The other 4 questions
This page shows 25 and marks what you pick. That's as far as a page can go. A free account opens the other 4 and keeps every answer. What you miss comes back until it's right: after a day, then at longer gaps.
Free · the whole bank · 100 marked answers per 30 days · written feedback on the paid plan