Automation Strategy
What earns a place in an automated suite, how a case is designed and run deterministically, and how a suite keeps its credibility. Interviewers probe the cost of ownership.
on this pageshowhide
explore
- Choosing What to Automate4 questions
- API-Level Case Design4 questions
- Data & Keyword Frameworks3 questions
- Waiting & Synchronization4 questions
- Suite Maintenance4 questions
- UI-Level Case Design3 questions
- Framework Architecture55 questions
- Codebase Structure16 questions
- Execution Runtime15 questions
- External Inputs12 questions
- Run Evidence12 questions
- AI-Augmented Testing28 questions
- Authoring Assistance11 questions
- Runtime Adaptation11 questions
- Team Consequences6 questions
- Asynchronous Flows27 questions
- Eventual State9 questions
- Transport Promises10 questions
- Long-Lived Channels8 questions
- Mobile Test Design30 questions
- Target Selection7 questions
- On-Device Behaviour15 questions
- Field Conditions8 questions
- Notification Flows33 questions
- Test Identities9 questions
- Channel Capture10 questions
- Downstream Realities14 questions
- AI & Data Scientistrole
- AI Engineerrole
- Backend Developerrole
- Data Engineerrole
- Frontend Developerrole
- Full Stack Developerrole
- Game Developerrole
- Java Backend Developerrole
- Java SDETrole
- Kotlin Backend Developerrole
- MLOps Engineerrole
- Machine Learning Engineerrole
- QA Engineerrole
- Software Architectrole
- iOS Developerrole
questions
195 · 11 sectionsWhich properties make a test case a good candidate for automation rather than manual running?
basics
~20 sA case pays back when it repeats often, the behaviour it checks is stable, its expected result can be judged mechanically, and running it by hand is slow or error-prone. High risk and a defect history raise its value further.
Which checks do you deliberately leave manual instead of automating, and why?
basics
~20 sChecks that run once, that need a person to judge look, wording or feel, that have no dependable expected result, and that drive an interface still being redesigned stay manual. Each of those costs more to automate than it returns.
How do you estimate whether an automated case will repay the cost of writing and maintaining it?
basics
~20 sCompare authoring plus recurring upkeep and triage against the manual cost per run multiplied by the runs expected before the behaviour changes. The break-even run count, and whether the horizon reaches it, decides. Most estimates omit upkeep.
Your team can sustain only a handful of new automated cases per release. How do you decide which behaviours get them?
basics
~20 sRank candidates by expected loss avoided per engineer-hour: severity and defect history, run frequency, manual cost, and expected upkeep. Reserve capacity for upkeep of existing cases before funding new ones, and record what stays manual and why.
What should a service-interface test assert about a response instead of comparing the whole payload?
basics
~20 sAssert the status code, the few fields the case is actually about, and the response shape the contract promises — and on failure paths the error envelope's code. Whole-body equality breaks whenever an unrelated field changes.
How should an automated case at a service interface obtain and refresh its access token?
basics
~10 sFetch the token programmatically from the token-issuing endpoint at setup using credentials injected from the environment, cache it per test identity, and refresh it before it expires. Never commit a hand-copied token.
How do you decide which assertions belong at the service interface rather than through the screen?
basics
~20 sPlace each assertion where its oracle lives: rules whose evidence is a value in a response belong at the service interface, while only what a person can observe needs the screen. Assert each rule at one level.
How do you design a case that proves a write request is idempotent when the client replays it?
basics
~20 sSend the identical request twice with the same caller-supplied idempotency key, then assert the observable state changed once — one record, one downstream effect — reading it back through an authoritative path rather than a cached view.
What is a data-driven test, and why does each row need its own case name?
basics
~20 sA data-driven test runs one piece of logic over many input rows held in a table or file. Each row should execute as its own named case, so a failure names the offending row instead of the whole test.
In a keyword-driven framework, what lives in the keyword table and what stays in code?
basics
~20 sThe table owns which named actions run, in what order, with what data and what expected outcome. Code owns each action's implementation: how it drives the interface, its waiting, its argument checks and its failure message.
When a keyword-driven failure names only a row, how do you make it diagnosable?
basics
~20 sRebuild at the keyword boundary what the machine stack no longer says: print the keyword invocation path, the step index, the bound arguments, a subject identifier from the system, expected versus observed, and per-row artefacts.
In an automated test, what makes a readiness signal worth waiting on rather than a proxy for it?
basics
~20 sWait on state that exists only once the work has finished: a persisted record, a status field at its final value, a drained queue. A proxy such as elapsed time or a progress indicator can be true before the work is done.
How do you choose the poll interval and the timeout for a wait-until-condition helper in a test?
basics
~20 sScale the poll interval to the cost of one check: small for a cheap local read, larger than the latency of a network call. Derive the timeout from a measured high percentile of the real wait plus headroom.
A suite's wait timeouts were all raised to 90 seconds to stop intermittent failures. What does that hide, and what should the team do instead?
basics
~20 sA blanket raise withdraws the claim that the system finishes in a known time. It hides performance regressions, wrong readiness signals and real races alike. Measure each wait's actual duration, set per-operation budgets from the tail, and fix the signal.
When is a retry inside an automated test a legitimate model of the system's contract, and when is it masking a race?
basics
~20 sA retry is legitimate when it mirrors a contract the system really offers — at-least-once delivery, bounded eventual consistency, a published idempotent operation — and the case asserts that guarantee. Otherwise the retry is discarding evidence of a race.
When an automated test fails in a pipeline run, what should its failure message and captured artefacts tell you before you re-run it?
basics
~20 sA failure should name the case, state expected versus actual in real values, and point at the failing step, with artefacts captured at that moment - logs, a screen or payload capture, the environment - so nobody has to re-run it to learn what happened.
How do you quarantine an automated test that fails intermittently on unchanged code without the quarantine becoming permanent?
basics
~20 sMove it out of the gating lane but keep it running in a non-blocking one, and record the symptom, a named owner, an expiry date and the behaviour now unguarded. Enforce owner, expiry and a size cap in the build.
An automated regression suite has doubled in size and upkeep cost - which cases do you delete, and how do you justify it?
basics
~20 sTreat every case as paying rent in runtime, upkeep edits and triage time, and earning it by covering a risk nothing cheaper covers. Delete duplicates of lower-level checks, change-detector cases and cases guarding removed behaviour - in reviewable batches, with the accepted risk written down.
How do you shard a long-running automated suite across parallel workers so that wall-clock time actually drops?
basics
~20 sWall clock is set by the slowest shard, so balance shards by each case's measured duration from previous runs rather than by name or count, and make shards genuinely independent - no shared mutable data, fixed identifiers, ports or accounts.
In a test that drives the application's screens, which steps belong on the screen and which should be arranged another way?
basics
~20 sDrive the screen only for the behaviour the case is about. Everything before that - accounts, records, settings, a starting state - should be arranged through a faster channel, so the case checks one thing and fails for one reason.
In a test that drives the application's screens, what should the final assertion check so the case is a real oracle?
basics
~20 sAssert the outcome a person would notice - the value, message or state the screen now shows - and assert its content, not just that an element exists. A case that cannot fail when the feature is broken is not an oracle.
A 340-case screen-driven pack checks every fare-calculation combination through the screens; which of those checks belong at a lower level?
basics
~20 sKeep at the screen level only what needs a screen: that the journey wires together and shows the right result. Rule and combination variation belongs where the rule lives, with one screen case proving the path.
A shared base class prepares every case in a suite — what does a case pay for setup it never uses?
basics
~10 sAn unused inherited setup step costs runtime and reliability: it still runs on every execution, so the case is slower and can fail for reasons unrelated to what it checks.
In an automated case, why should record provisioning happen in a setup step rather than between the assertions?
basics
~10 sSetup that breaks is not a failed check. Keeping provisioning in one step before the assertions lets a run report could-not-build-the-premise separately from the-product-behaved-wrongly — two different problems with two different owners.
Should a driver session be created per case, per class, or per parallel test worker, and what does each cost?
basics
~20 sDefault to a fresh driver session per case: it is the only lifetime that guarantees a clean start. Reuse across a class or a parallel worker only when acquisition is measurably slow; one case can then poison the next.
Why should an automated suite select a deployed target by name rather than carrying its address in the case?
basics
~20 sA named target is one indirection point the run resolves once, so the same suite can be pointed anywhere. An address written into a case pins that case to one deployment and must be found and edited when it moves.
In what order should a test run resolve configuration from defaults, files, process environment and explicit overrides, and why fix that order?
basics
~20 sResolve configuration once at startup in one fixed, documented order: built-in defaults, then a checked-in file, then process environment variables, then explicit overrides, each layer replacing the last. A fixed order makes every run's effective settings predictable.
Machine-drafted cases triple a regression suite's case count in a week. What has that growth not proven?
basics
~20 sCase count measures how much was written, not how much can be detected. Drafted cases usually re-walk journeys existing cases already walk and check outcomes already checked, so the set of failures the suite can catch may not grow.
When a suite repairs its own broken locators and still passes, which product defects does that green run hide?
basics
~20 sA repair hides every change that broke the original anchor: a control that moved, was relabelled, lost its announced name, or was replaced by a different one. The suite reports the flow works while the interface changed.
In a machine-drafted end-to-end case, how do you tell an outcome assertion from one that restates the steps just performed?
basics
~20 sAn outcome assertion checks a fact the system decided or stored on its own. A restating assertion only re-reads what the case supplied or already watched happen. Ask whether it would still pass with the behaviour removed.
Which decisions stay with a person when a machine drafts test cases from a running application?
basics
~20 sTwo: what correct behaviour actually is, and which behaviours carry real consequence. A tool drafting from a running system can only describe what it observes, so it will happily record a defect as the expected result.
When does delegating a test's pass/fail verdict to a model beat an explicit assertion, and when is it strictly worse?
basics
~20 sDelegate the verdict only when the acceptable result is a family you cannot enumerate: free-form text, wording shown to a user, perceived quality. Where an exact value or a structural rule exists, an explicit comparison is strictly better.
How does an automated case observe an outbound callback that the system sends to a configured destination?
basics
~20 sPoint the system's configured destination at a receiver the run stands up, then read the recorded request back from it. The receiver must be reachable from where the system runs, not only from the machine running the suite.
Which property should an automated test assert on when the effect it checks lands only after the call returns?
basics
~20 sAssert on a settled invariant, a property that stays true once the flow has finished, such as a terminal status or a final total. Do not assert on a counter or an intermediate status that is true for only a moment.
When a queue redelivers an identical order message, how do you design the case that proves it is applied once?
basics
~20 sPublish the identical order message twice — same identity, same body — wait for evidence that the second delivery was consumed, then assert a single visible effect: one row appended, one balance movement, one outbound notification.
Before asserting that two published events were processed in order, how do you establish the scope in which that order is promised?
basics
~20 sOrder is promised only inside a scope — usually a routing value such as an account or order identifier, or a single producing path. Read the design to find that scope, then confine the assertion to events sharing it.
How do you craft and inject a queue message the consumer cannot process for an automated test?
basics
~20 sPublish the bad message through the same path a real producer uses, give it a payload that fails at exactly one nameable stage, and tag it with a unique identifier so the case can find it wherever it lands.
What must an automated case assert after it backgrounds an app mid-form and brings it back?
basics
~20 sAssert the specific values a person would lose - the text already typed, the step reached in the flow, the selections made, any running countdown. Checking only that the app reopened proves nothing about restoration.
Why do a tap and a long press on the same list row need separate automated cases?
basics
~20 sA long press is a distinct input event that opens behaviour a tap never reaches: a context menu, selection mode, a drag handle. A tap case proves only the primary action, so the held gesture needs its own case.
Why can't a handheld app's automated suite just target the newest platform version?
basics
~20 sHandheld users choose when to update, and many devices stop receiving platform updates entirely, so the installed base stays spread across several version lines for years. A suite that runs only on the newest line leaves most real users unverified.
How do you design an automated case over a slow, lossy link so its result is repeatable?
basics
~20 sDeclare the link as an input: a named profile with fixed added delay, loss rate and bandwidth cap, applied at one controlled point in the request path. Then assert product behaviour under that profile, not raw elapsed time.
A disconnected mobile client queues user actions and delivers them on reconnect - what does an automated case assert at each of the three moments?
basics
~20 sAssert three times: while disconnected, that the action is locally accepted and marked pending; at reconnect, that delivery starts unprompted; once drained, that the far side holds the work and the device now matches it.
Why derive the recipient address in an automated sign-up test from the case and run identifiers?
basics
~20 sA derived address is self-describing: built from the case and run identifiers it is unique, so concurrent runs cannot collide, and it names the case and run that sent the email, making a stray email diagnosable on sight.
How do you extract a single-use activation link from a captured sign-up email so the extraction survives wording changes?
basics
~10 sMatch on structure, not on prose. Collect every link target in the message body, keep the one whose address is the activation route, and assert exactly one matched. Never anchor on the surrounding sentence.
Which assertion catches every unresolved placeholder in a rendered notification message at once?
basics
~20 sOne negative assertion over the whole rendered body beats per-field checks: fail if it still contains the message template's delimiters, a bare slot name, or the text an absent value renders as. Then assert the seeded values appear.
Why does a correctly sent activation email often arrive after the case checking for it has already failed?
basics
~20 sSending is asynchronous: the product only hands the message to a delivery path that queues and often batches it. Acceptance for delivery is not arrival, so a case that checks immediately reads a mailbox the message has not reached yet.