Automation Engineer interview questions
100 real questions with model answers and explanations for Automation Engineer candidates.
See a Automation Engineer resume example →Practice with flashcards
Spaced repetition · Hunter Pass
Questions
I separate test intent from transport details and keep shared infrastructure small.
- Test files describe business behavior, while browser pages, API clients, and infrastructure adapters own tool-specific calls.
- Fixtures compose capabilities such as authenticatedUser or seededOrder instead of exposing a global bag of helpers.
- Dependency rules prevent page objects from calling API assertions and keep reporting behind stable interfaces.
Why interviewers ask this: The interviewer is evaluating whether the candidate can define boundaries that limit coupling as the suite grows.
I share stable mechanics, not product-specific business language.
- Runner integration, retry policy, logging, HTTP transport, and artifact collection can serve many suites with versioned contracts.
- Checkout selectors, order builders, and domain assertions stay with the product because they change with that product.
- I extract code only after a second real consumer appears, since premature sharing creates release coordination without proven reuse.
Why interviewers ask this: The interviewer is checking whether the candidate can balance reuse against coupling and ownership cost.
I choose the narrowest scope that preserves isolation without making setup dominate runtime.
- A browser context and mutable user are test-scoped because cookies or changed data can leak between tests.
- A read-only service client or immutable reference dataset can be worker-scoped when concurrent access is safe.
- An expensive database container may be session-scoped, but each test still gets a transaction, schema, or unique tenant boundary.
Why interviewers ask this: The interviewer wants to see that fixture scope is based on mutability, concurrency, and setup cost rather than convenience.
I keep the fixture graph explicit and make every resource own its teardown.
- An order fixture requests apiClient and user directly instead of reading hidden global state.
- Cleanup is registered immediately after creation and uses a finally path so a failed assertion does not leave data behind.
- Teardown errors are reported separately from the test failure, preserving the original cause and the leaked resource identifier.
Why interviewers ask this: The interviewer is assessing whether the candidate can build composable fixtures with reliable lifecycle handling.
I use page objects for page-level workflows and component objects for reusable UI units.
- LoginPage can own navigation and sign-in, while DatePicker or DataGrid owns locators and actions repeated across pages.
- Assertions about business outcomes stay in the test, but a component may expose state such as selectedRows or errorText.
- Splitting every div into an object adds indirection, so I extract only units with behavior or meaningful reuse.
Why interviewers ask this: The interviewer is checking whether the candidate applies page abstractions without creating oversized or excessively fragmented objects.
I choose Screenplay when many actor types combine the same capabilities across long workflows.
- Tasks such as PlaceOrder compose smaller interactions, while abilities such as BrowseTheWeb or CallAnApi make dependencies explicit.
- It reduces duplicated flows across buyer, support, and admin actors better than inheritance-heavy page objects.
- For a small CRUD application it adds vocabulary and call layers, so straightforward page and component objects remain cheaper.
Why interviewers ask this: The interviewer is evaluating whether the candidate can justify Screenplay from workflow reuse rather than pattern popularity.
I inject explicit interfaces at fixture or constructor boundaries instead of constructing dependencies inside helpers.
- An OrdersClient receives an HTTP transport, credentials provider, and logger, which lets unit tests replace each with a deterministic fake.
- The composition root chooses real Playwright or requests implementations once per test environment.
- I avoid a service locator because hidden runtime lookups make dependencies and fixture lifetimes difficult to trace.
Why interviewers ask this: The interviewer is testing whether the candidate uses dependency injection to improve substitution and visibility rather than as ceremony.
I define and document one precedence chain, with command-line overrides above environment variables and checked-in defaults last.
- Non-secret defaults such as timeout and browser live in a typed config file, while tokens arrive only through environment variables or a secret manager.
- The loader records resolved non-secret values and their source so a CI mismatch can be reproduced.
- Unknown keys and conflicting options fail at startup instead of silently falling back during a test.
Why interviewers ask this: The interviewer is assessing whether the candidate can make configuration predictable, secure, and diagnosable.
I fail fast on missing capabilities instead of discovering them halfway through the suite.
- A typed schema validates URLs, durations, enum values, and required credential references without printing secret values.
- A preflight checks service health, expected API version, database migration level, and required browser binaries.
- Optional suites declare feature flags or tags explicitly, so an unavailable dependency causes a clear skip or setup failure rather than misleading test failures.
Why interviewers ask this: The interviewer is checking whether the candidate prevents configuration and environment faults from masquerading as product defects.
The report should preserve enough context to identify the failed step without rerunning blindly.
- I attach the assertion diff, structured test steps, request and response metadata, browser trace, screenshot, and video only when useful.
- Build SHA, environment, browser, seed, shard, retry number, and test owner make the result reproducible and routable.
- Secrets, authorization headers, and personal data are redacted before artifacts are uploaded, with retention limited by policy.
Why interviewers ask this: The interviewer is evaluating whether the candidate treats reporting as a debugging interface with security constraints.
I expose a small, versioned lifecycle API and isolate plugin failures from test execution where possible.
- Hooks such as beforeRun, afterTest, and onArtifact receive immutable event data instead of internal runner objects.
- Plugin order, timeout, and failure behavior are deterministic, with reporting plugins allowed to degrade without changing a passed test.
- Contract tests run third-party plugins against the next framework version before a breaking release.
Why interviewers ask this: The interviewer is checking whether the candidate understands extension boundaries and compatibility risks.
I keep retry policy in the runner layer and never hide retries inside page actions or API clients.
- A retry reruns the whole isolated test with a fresh context and records every attempt, preserving the first failure evidence.
- Only known transient categories get a small retry budget, while assertion failures do not receive automatic polling beyond the assertion timeout.
- A test that passes on retry remains flaky in metrics and can be quarantined with an owner and expiry date, not counted as clean.
Why interviewers ask this: The interviewer is assessing whether retries improve signal without concealing unstable tests or product behavior.
A fresh context gives strong session isolation at much lower cost than a new browser process.
- Cookies, local storage, permissions, and service workers are separated while the worker can reuse one browser process.
- Each test closes its context in teardown, which also closes pages and prevents state from reaching the next test.
- I launch a separate browser only for process-level settings, crash isolation, or extension behavior that contexts cannot separate.
Why interviewers ask this: The interviewer is testing whether the candidate understands browser process and session isolation boundaries.
I reuse the login setup, not a mutable account across concurrent tests.
- A setup project creates storageState for a worker-specific or role-specific user, and dependent projects load the correct file.
- Tests that change profile, cart, or permissions receive unique accounts or tenants even if initial cookies come from a template.
- Storage files stay out of source control and artifacts because they may contain reusable session cookies.
Why interviewers ask this: The interviewer is evaluating whether the candidate can optimize login while preserving data and credential isolation.
I intercept only the dependency whose behavior the scenario must control and leave the main system path real.
- A route can return a deterministic payment-provider decline while the application UI and backend still process the response normally.
- I assert the outbound method, body, and headers before fulfilling, so a broken integration request cannot pass against an overly permissive stub.
- Separate integration or contract tests verify the real provider boundary because interception cannot prove network compatibility.
Why interviewers ask this: The interviewer is checking whether the candidate understands what confidence is lost when network calls are mocked.
I wait on user-visible or protocol-level conditions that represent readiness.
- Playwright locators auto-wait for actionable elements, and assertions such as toBeVisible poll until their own bounded timeout.
- For background work I wait for a specific response, URL, download, or application state, registering the waiter before the triggering action.
- networkidle is a discouraged readiness heuristic because continuous polling or recurring requests may prevent it from settling. If legacy code requires it, I give it a bounded timeout, but prefer assertions on a specific response or application state.
Why interviewers ask this: The interviewer is evaluating whether the candidate can synchronize with application behavior instead of masking races with delays.
I isolate every mutable namespace before treating worker count as a speed setting.
- Users, email addresses, order IDs, files, and tenant names include the worker index or a generated run ID.
- Tests do not depend on order, shared downloads, or a common database row, and cleanup deletes only resources created by that test.
- External systems with strict limits use a semaphore or a serial project rather than allowing eight workers to corrupt shared state.
Why interviewers ask this: The interviewer is checking whether the candidate recognizes that parallelism exposes hidden test coupling.
I base the matrix on user risk and browser-engine differences rather than running every test everywhere.
- A small critical-path suite runs on all three engines for each pull request, covering login, checkout, and core navigation.
- The broader regression can run on Chromium per commit and on Firefox and WebKit nightly, with production browser share reviewed regularly.
- Engine-specific skips require a linked product limitation and expiry, while shared tests use standards-based selectors and assertions.
Why interviewers ask this: The interviewer is assessing whether the candidate balances cross-browser confidence, runtime, and maintenance cost.
I make rendering deterministic before adjusting screenshot tolerance.
- Baselines are captured in the same pinned browser and container image used by CI, with fixed viewport, fonts, locale, color scheme, and device scale factor.
- Animations, clocks, random data, and dynamic ads are disabled or masked, but real layout regions remain visible.
- Pixel thresholds cover minor antialiasing only; larger approved changes receive reviewed baseline updates rather than broad tolerance increases.
Why interviewers ask this: The interviewer is testing whether the candidate controls visual inputs instead of accepting noisy comparisons.
Automation catches repeatable rule violations but cannot certify that the experience is accessible.
- axe-core can detect missing names, invalid ARIA, contrast failures, and structural issues against rules integrated into component and page tests.
- Keyboard order, focus visibility, screen-reader announcements, zoom behavior, and task comprehension need manual checks with real assistive technology.
- I fail CI on new high-confidence violations and track known exceptions with rule, selector, owner, and expiry.
Why interviewers ask this: The interviewer is evaluating whether the candidate understands both the value and coverage limits of accessibility tooling.
Locked questions
- 21
How would you configure Selenium Grid for reliable parallel browser execution?
gridconfigselenium - 22
When would you keep Selenium instead of migrating an existing suite to Playwright?
seleniumplaywright - 23
How would you structure a reusable API test client without hiding the HTTP behavior under test?
http - 24
How do schema validation and behavioral API tests complement each other?
schemaapivalidation - 25
When is consumer-driven contract testing useful between two services?
contract - 26
How should a provider pipeline verify consumer contracts without becoming dependent on live consumer services?
ci-cd - 27
How would you contract-test an asynchronous event published to Kafka or RabbitMQ?
hypothesis-testingkafkaasync - 28
How would you test a webhook sender when delivery is retried and processed asynchronously?
asyncconcurrencywebhooks - 29
When would you use service virtualization instead of a simple mock server?
virtualizationmocking - 30
How would you automate an OAuth 2.0 authorization code flow with PKCE?
authoauth - 31
How do you test role and scope enforcement without maintaining an unmanageable authorization matrix?
auth - 32
How would you test API retry behavior without accidentally duplicating a side effect?
resilienceapi - 33
How would you model a CI pipeline as a DAG for an automation repository?
ci-cd - 34
What would you cache in CI, and what should never be restored as a trusted build output?
caching - 35
How would you shard a 40-minute test suite across CI workers?
shardingtesting - 36
How would you choose which automated suites block a pull request and which run later?
code-review - 37
How would you build a Docker image for browser tests that is reproducible and safe to run in CI?
reproducibilitydockertesting - 38
What should an ephemeral test environment contain before end-to-end tests start?
e2etest-environments - 39
How would you prevent abandoned ephemeral environments from consuming resources indefinitely?
- 40
Which Kubernetes primitives would you use to run an isolated test suite?
kubernetes - 41
A Kubernetes test Job remains Pending. What configuration would you inspect before changing the cluster?
kubernetesconfig - 42
How would you place Terraform plan and apply in a test-environment pipeline?
terraformci-cd - 43
How would you detect and handle Terraform drift in shared test infrastructure?
terraformiac - 44
How would you design test data for a suite that runs concurrently in several environments?
designconcurrencytest-data - 45
When would you reset test data with transactions, API cleanup, or disposable databases?
databasetransactionsapi - 46
How should CI tests receive and handle secrets?
secretstesting - 47
How do you design a performance test whose workload represents production behavior?
designperformanceperformance-testing - 48
How do you verify that the load generator and test environment are not invalidating a performance result?
generatorstest-environments - 49
What observability would you add to an automation system and the system under test?
system-designobservability - 50
Which quality metrics would you track for an automated test portfolio?
monitoring - 51
A Playwright test passes locally but fails in 12% of Linux CI runs when four workers share 2 CPU cores. How do you debug it?
playwright - 52
A Selenium test cannot locate a button inside an open shadow root after the application adopts Web Components. How would you inspect and automate it reliably?
decision-makingcomponentsselenium - 53
Eight parallel API tests use the same customer, and three fail only when another test cancels that customer's subscription. How do you fix the suite?
api - 54
A Cypress suite has a 30-second command timeout plus two CI retries, so a real failure takes 11 minutes to report. How would you reduce that delay?
resiliencecypress - 55
A renewal test passes in UTC but fails in America/New_York on the daylight-saving transition, showing the previous date. How do you diagnose it?
- 56
A property-based API test fails once every few hundred runs, but the report does not contain the generated payload. What do you change?
api - 57
A browser test video shows the Save button, but the click times out after 10 seconds. The trace shows an invisible loading overlay. What do you do?
- 58
After Chrome updates from 130 to 131, 90 of 500 Selenium tests fail to start only in CI. How do you recover?
seleniumzero-to-one - 59
A Playwright test times out waiting for networkidle after the application adds continuous polling. How would you synchronize it?
playwright - 60
A Playwright test must verify that an offline draft survives a page reload and syncs exactly once after connectivity returns. How would you make the state transition deterministic?
playwright - 61
A token-expiry test sleeps 61 minutes and occasionally fails because CI jobs pause. How would you redesign it?
tokens - 62
The second browser test in a worker starts already logged in, although each test creates a new page. What leaked, and how do you stop it?
- 63
A checkout test fails with 'request aborted', while its video only shows the spinner. How would you use the trace to classify the failure?
- 64
A provider changes status from PAID to SETTLED, and 34 consumer tests fail after deployment. How would contract testing have caught this?
contractdeployment - 65
An order producer renames the required totalAmount field to amount, and an older billing consumer sends 8,000 new messages to its dead-letter queue. What do you change?
data-structures - 66
Integration tests need 50,000 customer records, but the only available dump contains production names and emails. What test-data approach do you use?
integration - 67
Parallel integration tests leave about 300 database rows per run because cleanup sometimes executes before asynchronous jobs finish. How do you correct it?
integrationdatabaseasync - 68
The shipping service is unstable, but checkout tests must cover its 200, 429, timeout, and malformed-response behavior. How do you virtualize it?
resiliencevirtualizationtesting - 69
WireMock makes 420 tests green, but production fails because the real catalog API renamed productId to id. How do you prevent stale stubs?
api - 70
A Docker Compose test starts immediately, and 20% of runs hit PostgreSQL before migrations finish. What do you change?
postgresmigrationsdocker - 71
A Kubernetes preview environment is green by pod status, but tests receive DNS failures for the payment service during the first 90 seconds. How do you debug it?
dnskubernetestesting - 72
Four test pods are OOMKilled after the suite moves to an ephemeral Kubernetes namespace with a 2 GiB memory quota. What do you do?
kubernetesmemory - 73
A 1,200-test pull-request pipeline takes 48 minutes, while only 70 tests cover files changed in a typical commit. How would you reduce runtime safely?
ci-cd - 74
Browser installation and npm setup consume 14 of a 22-minute CI job. How would you shorten the pipeline?
npmci-cd - 75
An Appium test must verify that the same deep link opens the correct authenticated screen on Android and iOS. How would you set up and validate both platforms?
validationmobile - 76
An iOS Appium test finds two elements named Continue and taps the hidden one left by the previous screen. How do you fix the locator?
mobilelocators - 77
You can run only 12 mobile jobs per pull request, but support covers Android 10 to 15 and iOS 16 to 18 across phones and tablets. How do you choose the matrix?
zero-to-onecode-review - 78
A swipe-to-delete Appium test works on a Pixel 8 but opens the row on a small Android device. How do you make the gesture reliable?
mobile - 79
An Appium test must verify that tapping a push notification opens the correct order when the app is foregrounded, backgrounded, and terminated. How would you automate the three states?
mobile - 80
An Appium sync test fails when Wi-Fi drops for 20 seconds because it creates duplicate expenses after reconnection. How do you investigate it?
mobile - 81
A hybrid Android test fails only on devices whose WebView updates overnight, with a 'driver supports Chrome 132' mismatch. How do you stabilize it?
- 82
Two RPA workers sometimes pick the same invoice from a queue and both enter it into the ERP. How do you prevent duplicates?
data-structures - 83
An RPA bot retries a timed-out payment step three times, and one run creates three transfers. How would you redesign retries?
- 84
An invoice bot's CSS selector breaks weekly, and OCR reads 8 as B in 2% of totals. How would you improve extraction?
css - 85
A production bot stores an ERP password in its config file, and the password rotates every 30 days. What do you change?
passwordsconfig - 86
An RPA claims processor cannot decide 6% of cases because customer names differ between two systems. How do you handle them?
soft-skillssystem-designconcurrency - 87
Finance asks who changed a purchase order, but the bot log only says 'completed successfully'. What audit trail do you add?
- 88
A bot updates CRM, then crashes before updating billing, leaving 140 work items in mixed states. How do you recover and prevent recurrence?
- 89
A Prometheus alert for failed test jobs never fires because the metric label changed from result to status. How do you catch this earlier?
monitoringalerting - 90
A Grafana alert fires every minute for a 10-second CPU spike, sending 180 notifications in three hours. How do you tune it?
alertingmonitoring - 91
One database outage creates 46 alerts from tests, APIs, queues, and dashboards. How would you deduplicate and route them?
databasequeriesapi - 92
Health checks stay green while users cannot complete checkout after login. What synthetic monitor would you add?
monitoringhealth-checks - 93
A nightly certificate check reports 200 for an endpoint whose TLS certificate expires in four days. What automation do you add?
tlsendpoints - 94
A k6 test reaches only 600 requests per second against a 1,000 RPS target, while API CPU is 35% and database connections are maxed at 100. What do you investigate?
databaseapiload-testing - 95
A load test plateaus at 2,000 RPS, but server metrics remain flat and each generator VM has 100% CPU. How do you prove where the limit is?
load-testingmonitoringgenerators - 96
Overnight CI has 37 failures across 900 tests. How would you automate first-pass triage by morning?
testing - 97
A scheduled-automation dashboard shows 100% success after its metrics exporter stops emitting data. How would you detect and alert on missing telemetry without creating noise during planned maintenance?
monitoringalerting - 98
In code review, you see a flaky-test fix that wraps every click in three retries. What feedback and alternative do you give?
feedbackcode-reviewflaky - 99
Thirty-seven test and RPA automations have no owner, and six have failed silently for more than a month. What process do you put in place?
concurrency - 100
A teammate's pull request cuts CI from 24 to 9 minutes by removing 140 tests, including refund and password-reset cases. How do you review it?
code-reviewpasswordstesting