Test cases for ticket booking (train, flight, movie)
Updated 2026-11-13 · 7 min read
Booking flows fail where money, inventory and time meet. These 35 cases cover search, seat selection and holds, passenger details, fares and payment, waitlists, cancellation, tickets, security and peak load.
Written for a booking app that can sell train, flight or movie tickets; rows that apply to only one kind say so. All rules below (advance booking window, seats per booking, hold time, refund cut-offs) are examples: operators set their own and change them, so take the real values from the current rules before running.
How to answer in an interview
Ask first: which kind of tickets, is there seat selection, how long is a seat held during payment, how many seats per booking, are there quotas or waitlists, what are the cancellation and refund rules, and what happens at peak times such as the opening of a sale? Then follow the user journey: search, choose seats, passenger details, fare and payment, confirmation and ticket, cancellation. Close with concurrency and peak load, which is where booking systems usually fail.
Scope and test data
Example rules: bookings open up to 60 days ahead; at most 6 seats per booking; selected seats are held for 10 minutes. Test passengers use obviously fake names and contacts (Asha Test, [email protected], 9000000001). Payment uses the provider's sandbox and its published test methods only. Concurrency and peak-load cases need a test environment and tooling agreed with the team. These are designed cases, not an execution report.
Search
| ID | Category | Test case | Expected result |
|---|---|---|---|
| T01 | Functional | Search Delhi to Mumbai for a date next week | Results with times, availability and price |
| T02 | Negative | Search with the same source and destination | Validation message; no search sent |
| T03 | Negative | Pick yesterday's date | Past dates cannot be chosen |
| T04 | Boundary | Pick the last day of the booking window, then the day after | Last day searchable; the day after blocked with a message |
| T05 | Negative | Search a route or date with no services | Clear "no results" with a way to change the date |
| T06 | Functional | Use the swap button | Source and destination swap; results refresh |
Seat selection and holds
| ID | Category | Test case | Expected result |
|---|---|---|---|
| T07 | UI | Open the seat map | Available, booked and held seats look different; a legend explains them |
| T08 | Boundary | Select 6 seats, then a 7th | 6 allowed; the 7th blocked with a message |
| T09 | Functional | Two test users try to book the same last seat at the same time | Exactly one gets it; the other is told and can pick again |
| T10 | Boundary | Hold seats and wait past 10 minutes without paying | Seats released; user told; payment on the expired hold is refused |
| T11 | Functional | Movie: leave a single empty seat between booked seats, if the cinema forbids it | Blocked with an explanation, or allowed, as the rule says |
| T12 | Functional | Train: choose a berth preference | Shown as a preference, not a guarantee, unless the rules say otherwise |
Passenger details
| ID | Category | Test case | Expected result |
|---|---|---|---|
| T13 | Boundary | Enter ages at each fare boundary (child, adult, senior) | Fare category switches exactly at the boundary in the rules |
| T14 | Negative | Leave the name empty; enter digits in the name | Validation messages next to the field |
| T15 | Functional | Flight: add an infant on an adult's lap | Infant fare applied; infant linked to that adult |
| T16 | Functional | Flight: enter the ID details the airline requires | Fields required and validated as per the airline's rules |
| T17 | Functional | Enter contact [email protected] and 9000000001 | Ticket and updates go to these contacts in the test environment |
Fare and payment
| ID | Category | Test case | Expected result |
|---|---|---|---|
| T18 | Functional | Check the fare breakdown | Base fare, taxes and fees add up to the total charged |
| T19 | Functional | Apply a valid, an expired and a not-applicable promo code | Valid code reduces the total; others show a specific reason |
| T20 | Functional | Pay successfully with a sandbox method | Booking ID or PNR generated; seats marked booked; confirmation sent |
| T21 | Negative | Payment succeeds but the booking call times out | Booking completed later by reconciliation, or an automatic refund; the user is told which |
| T22 | Negative | Payment fails | No ticket; seats stay held until expiry or are released; user can retry |
| T23 | Negative | Double-click Pay, or press Back and Pay again | One charge and one booking |
Waitlist and availability
| ID | Category | Test case | Expected result |
|---|---|---|---|
| T24 | Functional | Train: book when only waitlist is available | Status shows the waitlist position before and after payment |
| T25 | Functional | Train: a confirmed passenger cancels | Waitlisted bookings move up as the rules say; status updates for the user |
| T26 | Functional | Show or flight fully sold | Sold-out state; no seat selection or payment possible |
Cancellation and changes
| ID | Category | Test case | Expected result |
|---|---|---|---|
| T27 | Functional | Cancel before the refund cut-off | Refund amount shown before confirming; refund matches it |
| T28 | Boundary | Cancel just before and just after the cut-off | Refund changes exactly at the cut-off |
| T29 | Functional | Cancel one of three passengers | Only that passenger cancelled; refund for that share only |
| T30 | Functional | Flight: change to another date | Fare difference and fees shown and charged correctly |
Ticket, security and performance
| ID | Category | Test case | Expected result |
|---|---|---|---|
| T31 | Functional | Open the e-ticket and booking history | Passenger, seat, date, time and booking ID correct; QR code scans in the test scanner |
| T32 | Security | Change the booking ID in the ticket URL or API to another user's | Access denied; no ticket details shown |
| T33 | Security | Send many search or booking requests from one client quickly | Rate limit or challenge as specified; normal users unaffected |
| T34 | Performance | Simulate the opening of a popular sale with many users | Queueing or throttling works; no seat sold twice; no payment without a booking outcome |
| T35 | Functional | Flight: book a route across time zones | Departure and arrival shown in each airport's local time and labelled |
What to prioritise
T09, T10, T21, T23 and T34: each can sell one seat twice or take money without a ticket. In an interview, many candidates list only the happy path and form validation. Mention concurrency and the payment-to-confirmation gap, and say how you would create them in a test environment.
Downloads
Quick answers
What is the hardest part of a booking system to test?
Two people trying to book the same last seat at the same moment (T09), and the gap between payment success and ticket confirmation (T21). Both need controlled test data and usually an API or tool to create the timing; clicking in two browsers is not reliable.
Should I quote real IRCTC or airline rules in an interview?
Only if you are sure and say they can change. It is safer to say 'the operator's current advance-booking window and refund rules' and show how you would test them as boundaries.
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.
