Skip to content
QA Knowledge Hub

Test cases for forgot password and reset

Updated 2026-11-12 · 4 min read

The reset flow is a common way into other people's accounts, so interviewers like it. These 30 cases cover the request, the email, the link, the new password and the security traps, with a CSV download.

Assumes the flow: user enters an email, receives a link, opens it, sets a new password, then logs in. For an OTP-based reset, apply the same ideas to the OTP (expiry, retries, resend limits).

How to answer in an interview

Split it into four parts: requesting the reset, the email, the link and the new password. Then add the security point most candidates forget: the page must not reveal whether an email is registered, and reset links must be single-use and short-lived.

Request

IDCategoryTest caseExpected result
F01FunctionalRequest a reset for a registered emailNeutral confirmation shown; email sent
F02SecurityRequest a reset for an unregistered emailThe same neutral message (no account enumeration)
F03NegativeEmpty email fieldRequired-field message
F04NegativeInvalid email formatFormat message
F05FunctionalEmail typed with different case or surrounding spacesStill finds the account
F06SecurityRequest many resets for the same email in a minuteRate-limited; the owner is not flooded
F07FunctionalRequest twice in a rowThe newest link works; earlier links stop working
F08NegativeRequest for an unverified or deactivated accountBehaviour matches the requirement; no sensitive detail leaked
IDCategoryTest caseExpected result
F09FunctionalEmail arrives within the stated time, correct sender, readable on mobileYes
F10FunctionalThe link opens the reset pageYes, over HTTPS
F11SecurityThe link contains a long random token, not the email or user idToken is unguessable
F12SecurityChange one character of the tokenRejected with an "invalid link" page
F13SecurityUse the link after the expiry time (for example 30 minutes)Expired message and a way to request again
F14SecurityUse the same link a second time after a successful resetRejected
F15SecurityOpen the link, then log in normally with the old password, then finish the resetBehaviour defined by the requirement; token should become invalid after use
F16SecurityCheck the reset URL is not leaked to third parties (Referer header, analytics)Not sent

New password

IDCategoryTest caseExpected result
F17FunctionalSet a valid new password and confirmSuccess message; user can log in with the new password
F18NegativeNew password and confirmation do not matchMismatch message
F19NegativeNew password breaks the rules (length, character types)Rules listed
F20NegativeNew password equals the old passwordRejected if the policy says so
F21FunctionalLog in with the old password after resetFails
F22SecurityExisting sessions on other devices after resetEnded, if the requirement says so
F23FunctionalA confirmation email that the password changedSent, with a "not you?" instruction, and no password in it
F24NegativeSubmit the new password twice quicklyOne change; no error

Other

IDCategoryTest caseExpected result
F25SecurityScript and SQL text in the email fieldHandled safely
F26SecurityTamper with the request to reset another user's password (change the user id or email in the body)Server refuses; the token decides whose password changes
F27UIThe flow on a 360px phoneReadable, no overlap
F28UIShow/hide password, strength hints, accessible labelsPresent and working
F29CompatibilityOpen the link in a different browser than the one that requested itWorks (the link must not depend on cookies of the first browser)
F30FunctionalThe "Back to login" link from every page of the flowWorks

Downloads

Want a project you can show in interviews?

The portfolio project kit walks you through testing a deliberately buggy app with Selenium or Playwright and API tests, then explaining it. The app itself is free.