Prepare for an Amazon SDET interview with a synthetic notification retry case, virtual time, test architecture, and a customer-focused release decision.

Author: PracHub

Published: 11/16/2026

Amazon SDET Interview Preparation: Coding, Test Architecture, and Quality Decisions

November 16, 2026

Quick Overview

Separate the public role and individual accounts from an original test harness for deterministic redelivery and release judgment.

Software EngineerFree

A distributed service receives the same work item twice after an acknowledgement is lost. It shows a green build and sends a customer two notifications. For Amazon SDET interview preparation, write a deterministic duplicate-delivery test and explain what evidence would let the release proceed. A unit test that checks a method returned success does not observe the user consequence.

Official evidence. Amazon's Software Dev Engineer, Test role page describes software development with automation and quality responsibilities for a named team. Amazon's general hiring material describes an interview loop, and its public Leadership Principles provide context for behavioral preparation. Use the current job description and invitation for your role and level. Amazon Software Dev Engineer, Test posting. Amazon interview loop. Amazon Leadership Principles.

Candidate reports. One self-reported SDET II loop describes coding, automation-oriented tests, and testing a scalable system design. Another account for a Seattle SDET II role describes coding, system design and higher-level automation discussion. Treat both as individual experiences. The notification case below is an original practice exercise, with no claim that Amazon asks it. Firsthand SDET II candidate account. Separate SDET II candidate account.

Try the backend unit testing interview guide for complementary work on test doubles and assertions.

Amazon SDET Interview Preparation

Turn the customer problem into a reason to test

The fictional service sends one reminder per eligible customer order and reminder version. A worker dequeues a message, records the intended reminder, and asks an approved downstream service to deliver it. Acknowledgement can be lost after successful processing. The queue can redeliver. The outgoing adapter and downstream test double accept a stable operation ID, representing a contract that an accepted retry can be looked up or deduplicated. The exercise does not assume that every production messaging provider offers that behavior.

Start with the user invariant. An eligible reminder can be safely attempted more than once under the dispatch contract, but the customer's expected delivery is one for that order and version. A different version may represent a legitimate different reminder. The stable key therefore needs business scope and meaning. A queue delivery ID identifies an attempt, not necessarily the original intent. Choose the correct contract and describe where the system stores it. In an interview, ask whether “no duplicates” means one stored reminder, one downstream accepted operation, or one delivered message. Those are observably different outcomes.

Make a test harness prove release readiness

Draw the test harness and where it observes state

Inject a test clock and use a durable-state interface the test can inspect. A fake input queue emits the same work event twice with distinct delivery attempt IDs. The first result is accepted by the approved test sink and the test withholds an acknowledgement. Advance the virtual clock until the test schedules the redelivery. The fake sink records every attempted call and its single accepted operation for the same stable key, according to its declared fake contract. Then run the code path that would use a real provider in a non-production integration environment if available.

FixtureRequired evidence
One work event, acknowledgedOne accepted reminder and one expected durable status
First attempt succeeds and acknowledgement is lostAnother delivery attempt may occur; exactly one accepted operation for the same business key
Source sends new reminder versionNew valid identity and expected independent decision
Sender fails before accepting requestSafe retry or reviewed failure, with no false sent status
Sender result ambiguousObservable pending or reconciliation state under the specified rule
Eligible order becomes canceled before allowed sendRemains unsent under the checked business rule

Keep the setup values small enough to score the answer. For the second case the test retains the input operation ID R-91, body version 4, two attempt IDs and event times. Assert the durable state and the fake sink observations. A code excerpt can focus on what the test asserts, leaving the adapter implementation to a separate task.

def assert_redelivery_result(result):
    assert result.operation == "R-91"
    assert result.delivery_attempts == 2
    assert result.accepted_sink_operations == ["R-91"]
    assert result.durable_status == "sent"

This is an assertion helper for the fictional harness, not a proof that an actual provider guarantees exactly-once effects. A fake that merely returns success hides whether the program ever attempted a duplicate dispatch. Expose both permitted attempts and distinct accepted operations. For a unit test, use an explicit fixture so the candidate can reason in code without dependent services. For higher-boundary verification, test actual persistence and ordering in the approved environment, because a fake store might miss a production race.

Explain failure, release and the person owning the outcome

At release review, the team can choose to hold a new worker revision or ship with a limited cohort depending on what failed. In the exercise, a reproduced duplicate reminder after a lost acknowledgement violates the explicit customer requirement, so the QA and release owners hold the affected worker rollout. Separately, a test that hangs because it used a real timer is evidence of test design trouble. It may warrant an investigation and a reliable replay, but it doesn't by itself confirm the duplicate condition. Preserve both findings with the exact build and initial state.

Start a review with the simplest failure trace. “First send accepted at virtual time 1. The worker never received an acknowledgement. Time advances to 31 and the same business key redelivers. The new revision sends again under a different downstream key. The staging run confirms two accepted operations. This is visible to customers.” State what changed about the key or workflow and verify the fix at the level that originally failed. Describe who owns the event replay and who can approve reopening the release.

An interviewer may ask for code complexity. With a durable keyed lookup and a supported conditional write, ordinary application reasoning can concentrate on bounded work per event while storage and wait time dominate the operational performance. Don't confuse average lookup cost in an in-memory fake with transaction cost or retention in the production store. Decide how long old keys need to survive according to redelivery and auditing requirements. Test a repeat event near that boundary.

Prepare an ownership story around the testing decision

For a behavioral answer, tell the story as a decision with evidence rather than a list of frameworks. Perhaps you noticed that test reports counted any repeated queue event as a bug. You worked with a service owner to establish which event was expected to repeat and which customer action should occur once. You added a stable fake clock, then transferred maintenance of the fixture to the team whose code responds to it. The useful outcome is that a later change reproduced the problematic retry deterministically and the release owner could act. If the work happened in a lab, describe that scope. If the change helped in a real release, name the evidence actually observed.

Practise a follow-up about disagreement. An engineer may want to relax the assertion if the fake accepts two attempts. Show why the test records both attempted and accepted side effects. If the sink is not sufficient evidence, add the approved provider contract check. If the unexpected event really is the fake applying weaker semantics than production, align the fake and add an independent test. Describe what specific finding made you change the test or the release decision.

Finally, state what you would do once the defect is closed. Include the use case in a durable regression suite, move expensive integration checks to the relevant path, and keep fast local fixtures for normal code changes. Keep one example of the outcome the original test would have missed. The strongest testing story is easy for a teammate to reproduce and interpret.

Use a bounded coding exercise to distinguish three counts

Present the event as an order ID and reminder version, with a separate delivery attempt ID and a virtual timestamp. The first two fields form a business key. Track recorded attempts in one list and accepted sink keys in another map. Drive both events through the same worker logic. If a test calls the sender directly instead of the worker after the simulated lost acknowledgement, it never checks whether the integration retains the stable key. Add a fixture for a second version to show that legitimate work is not collapsed. Compare the shape of a simple key and flag why a delimiter-concatenated representation can be ambiguous when values are unconstrained.

For a concurrent version, let two workers obtain the same underlying intent before releasing their guarded commit step. The test should produce a deterministic observation of the persistence outcome rather than depend on thread scheduling. A store double can establish whether the worker honors an explicit outcome such as pending or already accepted. A provider or database contract test establishes whether the real concurrency primitive offers the semantics advertised. The exercise uses a fake clock to make retries reproducible. It does not claim virtual timing represents production latency.

A customer asks for evidence of release quality. Provide one narrow statement: the approved redelivery fixture uses the same reminder key and produces one accepted notification for the staged attempt. Record the tested source and versions, what real provider behavior was observed, and any excluded concurrency dimension. If you cannot prove the output of the real delivery path, leave that as a verification item for the service owner. This keeps the coding task, integrated test and release decision connected.

Add a timing follow-up with an explicit deadline. If a reminder is only useful until the end of its delivery window, a late retry should reach the correct expired outcome under the business rule. A virtual clock can place one input just before and one exactly at that boundary. Record both results and how pending status becomes observable. Otherwise a harness can prove one accepted notification and still miss an operational defect that sends it during the wrong shift. Decide how the normal worker clock and downstream service clock agree on the cutoff.

Run the fictional redelivery case against these exercises. Explain which test proves code behavior and which result supports a release decision.

PracHub questionWhat to practise
Design streaming error-log counting with moving averageState invariants and define deterministic time-aware inputs.
Decide When Automated Tests Are NecessaryExplain where a contract needs a real integration check.
How would you lead a team to improve quality?Tie automation work to a repeated quality defect.
Ship-or-Delay Call on a Major Bug Two Days Before a Key Customer ReleaseGive the release owner a defendable ship or hold decision.
Prioritizing QA Work Under Deadline PressurePrioritize the highest-risk regression under a real deadline.

Give a short SDET answer aloud

“I'd define the duplicate invariant for one order and reminder version, and use a synthetic clock, independent attempt IDs and a stable operation key. My test withholds the first acknowledgement after a recorded success, then forces redelivery. It verifies the durable state and accepted operation count, even if two attempts occurred. I'd hold the affected rollout for a reproduced duplicate and reopen it after the deterministic regression and the permitted persistence or provider-contract test pass.”

Use the backend testing practice and replace the provider with one without deduplication. Explain the changed assumption and what state or recovery decision your test would now verify.

Sources and Further Reading


Comments (0)