Write the test cases for a guest checkout flow on an e-commerce site.
JuniorWalk the funnel — cart → address → shipping → payment → confirmation — and cover the guest-specific divergences: no saved data, email-only identity, and guest-to-account conversion afterwards.
// What interviewers look for
That you see checkout as a multi-step funnel with state carried between steps, and that the guest path has its own bug set distinct from the authenticated path.
Common pitfall
Testing checkout as a single screen and ignoring that guest flows lack saved addresses/payment and have to handle order lookup and later account linking by email.
Model answer
I'd map the funnel and test each transition plus the state carried forward. Cart: add, update quantity, remove, and an out-of-stock item appearing at checkout. Address: validation, required fields, an unsupported shipping region. Shipping: rate selection and the total updating correctly. Payment: a valid sandbox card, a decline, a 3DS challenge, and a gateway timeout. Confirmation: order created once, confirmation email sent, correct totals. Then the guest-specific cases: there's no saved data so I check the email-only identity, the order-lookup token can't be guessed, and if the guest later registers with the same email the past order associates to the new account. I'd also cover session expiry mid-funnel and back-button re-submission. The point is the funnel carries state between steps, so I assert it stays consistent end to end, and the guest path diverges from the logged-in path at identity and persistence.