How to Write Test Cases for Onboarding Flow (With Examples)

How to Write Test Cases for Onboarding Flow (With Examples)

June 24, 2026 · 17 min read · How-To Guides

How to Write Test Cases for Onboarding Flow (With Examples)

How to Write Test Cases for Onboarding Flow (With Examples): Core Principles

Writing test cases for an onboarding flow starts with a clear definition of what onboarding means for the product under test. Onboarding is the sequence of screens, forms, permissions, and optional tutorials that a new user encounters from the moment they launch the app or visit the site until they reach the first “core” screen where they can accomplish a primary task. Because onboarding sets expectations, any friction here directly impacts activation, retention, and brand perception. Therefore, test cases must verify not only that each step works as designed but also that the flow gracefully handles invalid input, interruptions, and varied user contexts.

A test case is a single, executable verification that maps to one or more requirements. Its anatomy consists of:

When you write test cases, keep each one focused on a single verification point. Avoid bundling multiple assertions into a single case; instead, split them so that a failure points directly to the offending step. This practice improves traceability, simplifies root‑cause analysis, and makes maintenance easier when the UI changes.

How to Write Test Cases for Onboarding Flow (With Examples): Building the Test Matrix

A test matrix is a tabular view of all test cases that lets you see coverage at a glance. The matrix should include the columns described above plus any metadata that helps prioritization (e.g., priority, risk level, associated requirement IDs). Below is a worked example that contains more than twenty test cases for a typical mobile‑app onboarding flow that includes:

  1. Welcome screen with a “Get Started” button.
  2. Permission request for push notifications.
  3. Email/phone entry with password sign‑up form (email, password, confirm password).
  4. Optional social‑login buttons (Google, Apple).
  5. Terms of service checkbox.
  6. Final “Create Account” button that leads to a tutorial carousel.
  7. Skip tutorial option).
IDPreconditionsStepsExpected Result
ONB‑001Fresh install, no network1. Launch app.
2. Observe welcome screen.
Welcome screen is displayed; “Get Started” button is enabled but shows a toast “No internet connection”.
ONB‑002Fresh install, network available Launch app app..
2 2. . Tap Tap the the ““Get Get Started Started”” button button..
Permission Permission dialog dialog for for push push notifications notifications appears appears..
ONB‑003App launched, permission dialog shown1. Tap “Allow” on the push‑notification prompt.Permission is granted; app proceeds to the email/phone entry screen.
ONB‑004App launched, permission dialog shown1. Tap “Deny” on the push‑notification prompt.Permission is denied; app proceeds to the email/phone entry screen (no push‑notification feature enabled).
ONB‑005Email/phone entry screen displayed, no prior data1. Enter a valid email address “user@example.com”.
2. Tap “Next”.
Password field becomes visible and enabled; email address is retained in the field.
ONB‑006Email field contains a valid email, password field visible1. Enter a password that meets policy (≥8 chars, 1 upper, 1 lower, 1 digit).
2. Tap “Next”.
Confirm‑password field becomes visible; password is masked.
ONB‑007Confirm‑password field visible1. Re‑enter the same password.
2. Tap “Next”.
Terms of service screen appears with checkbox unchecked.
ONB‑008Terms of1. Scroll to read the full terms (if scrollable).
2. Tap the checkbox to select it.
3. Tap “Create Account”.
Account is created; backend returns a 201 response; user is redirected to the tutorial carousel.
ONB‑009Terms screen, checkbox unchecked1. Tap “Create Account” without checking the box.Inline validation error appears: “You must accept the terms of service”.
ONB‑010Email entry screen1. Enter an email with missing “@” (e.g., “userexample.com”).
2. Tap “Next”.
Inline error: “Please enter a valid email address”.
ONB‑011Email entry screen1. Enter an email longer than 254 characters.
2. Tap “Next”.
Inline error: “Email address is too long”.
ONB‑012Password field1. Enter a password with only lowercase letters (e.g., “password”).
2. Tap “Next”.
Inline error: “Password must contain at least one uppercase letter, one digit, and be 8+ characters”.
ONB‑013Password field1. Enter a password with leading/trailing spaces (e.g., “ Abcdef1 ”).
2. Tap “Next”.
System trims spaces and accepts the password if it meets policy after trimming; otherwise shows appropriate error.
ONB‑014Confirm‑password field1. Enter a password that differs from the first password entry.
2. Tap “Next”.
Inline error: “Passwords do not match”.
ONB‑015Any screen with a network call1. Enable airplane mode before launching the app.
2. Attempt to proceed through the flow.
At the first network‑dependent step (usually after “Create Account”), an offline‑friendly message appears and the user can retry when connectivity returns.
ONB‑016Account created successfully, tutorial carousel shown1. Swipe left on the first tutorial card.
2. Swipe left on the second card.
3. Tap “Got It” on the final card.
Tutorial carousel dismisses; user lands on the home dashboard.
ONB‑017Tutorial carousel shown1. Tap the skip link (usually top‑right) on the first card.Tutorial carousel dismisses immediately; user lands on the home dashboard.
ONB‑018Home dashboard reached1. Press the device back button.App shows a confirmation dialog: “Are you sure you want to exit? Your progress will be saved.”
ONB‑019Confirmation dialog shown1. Select “Stay”.Dialog dismisses; user remains on the home dashboard.
ONB‑020Confirmation dialog shown1. Select “Exit”.App closes; no data is lost because the account was already created on the server.
ONB‑021Fresh install, language set to Spanish (via device settings)1. Launch app.
2. Observe all onboarding screens.
All text appears in Spanish; placeholders and validation messages are correctly localized.
ONB‑022Fresh install, TalkBack enabled (Android) or VoiceOver enabled (iOS)1. Launch app.
2. Navigate using swipe gestures and listen to spoken hints.
Every interactive element announces its purpose, state, and value; focus order follows visual order; no trapped focus.
ONB‑023Fresh install, font size set to largest accessibility setting1. Launch app.
2. Verify that all text scales without clipping or overflow.
UI elements resize gracefully; no horizontal scrolling is required; all buttons remain tappable.
ONB‑024Fresh install, low‑end device (≤1 GB RAM, Android 8)1. Launch app.
2. Complete the onboarding flow.
Flow completes within 15 seconds; no dropped frames; memory usage stays below 200 MB.
ONB‑025Fresh install, high latency network (simulated 200 ms RTT)1. Launch app.
2. Proceed through each step, observing spinner behavior.
Network‑dependent steps show a spinner; timeout is not reached; retry mechanism works if a request fails.
ONB‑026Fresh install, date set to a future date (e.g., +1 year)1. Launch app.
2. Attempt to create an account.
If the backend validates birth‑date or expiration fields, appropriate error is shown; otherwise account creation proceeds normally.
ONB‑027Fresh install, device locale uses right‑to‑left language (e.g., Arabic)1. Launch app.
2. Observe layout direction.
All layouts mirror correctly; text is right‑aligned; icons that have directional meaning are mirrored.
ONB‑028Fresh install, user has an existing account (data cleared from app but not server)1. Launch app.
2. Enter credentials for the existing account on the sign‑in screen (if offered).
Sign‑in succeeds; user is taken directly to home dashboard, bypassing the sign‑up flow.
ONB‑029Fresh install, user attempts to sign up with an email already registered1. Enter an email that exists in the backend.
2. Complete password fields and terms.
3. Tap “Create Account”.
Backend returns a 409 conflict; app shows error: “An account with this email already exists. Please sign in or use a different email.”
ONB‑030Fresh install, user enables “Hide password” toggle (if provided)1. Enter a password.
2. Tap the eye‑icon to hide/show.
3. Verify masking behavior.
Password characters are replaced with dots when hidden; visible when shown; toggle state persists across screen rotations.

How to use the table

How to Write Test Cases for Onboarding Flow (With Examples): Negative and Edge Cases

While the matrix above already contains a number of negative scenarios (invalid email, missing terms, network loss), it is useful to categorize them explicitly so that reviewers can see the balance between positive and negative coverage.

Negative Test Cases (validation & error handling)

IDDescriptionExpected Result
ONB‑N01Submit email without “@” characterInline error: “Please enter a valid email address”.
ONB‑N02Submit email with multiple “@” charactersInline error: “Please enter a valid email address”.
ONB‑N03Submit password shorter than 8 charactersInline error: “Password must be at least 8 characters”.
ONB‑N04Submit password lacking an uppercase letterInline error: “Password must contain at least one uppercase letter”.
ONB‑N05Submit password lacking a digitInline error: “Password must contain at least one digit”.
ONB‑N06Submit password containing only spacesInline error: “Password cannot be empty”.
ONB‑N07Submit confirm‑password that does not match passwordInline error: “Passwords do not match”.
ONB‑N08Attempt to create account without accepting terms of serviceInline error: “You must accept the terms of service”.
ONB‑N09Attempt to create account with an email already registered (case‑insensitive)Error dialog: “An account with this email already exists”.
ONB‑N10Submit form while device is in airplane mode (network unavailable)Friendly offline message; option to retry when connectivity returns.
ONB‑N11Submit form with a future birth‑date (if collected)Validation error: “Birth date must be in the past”.
ONB‑N12Submit form with special characters that could lead to injection (e.g.,