Skip to content
QA Knowledge Hub

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.

IDCategoryTest caseExpected result
T01FunctionalSearch Delhi to Mumbai for a date next weekResults with times, availability and price
T02NegativeSearch with the same source and destinationValidation message; no search sent
T03NegativePick yesterday's datePast dates cannot be chosen
T04BoundaryPick the last day of the booking window, then the day afterLast day searchable; the day after blocked with a message
T05NegativeSearch a route or date with no servicesClear "no results" with a way to change the date
T06FunctionalUse the swap buttonSource and destination swap; results refresh

Seat selection and holds

IDCategoryTest caseExpected result
T07UIOpen the seat mapAvailable, booked and held seats look different; a legend explains them
T08BoundarySelect 6 seats, then a 7th6 allowed; the 7th blocked with a message
T09FunctionalTwo test users try to book the same last seat at the same timeExactly one gets it; the other is told and can pick again
T10BoundaryHold seats and wait past 10 minutes without payingSeats released; user told; payment on the expired hold is refused
T11FunctionalMovie: leave a single empty seat between booked seats, if the cinema forbids itBlocked with an explanation, or allowed, as the rule says
T12FunctionalTrain: choose a berth preferenceShown as a preference, not a guarantee, unless the rules say otherwise

Passenger details

IDCategoryTest caseExpected result
T13BoundaryEnter ages at each fare boundary (child, adult, senior)Fare category switches exactly at the boundary in the rules
T14NegativeLeave the name empty; enter digits in the nameValidation messages next to the field
T15FunctionalFlight: add an infant on an adult's lapInfant fare applied; infant linked to that adult
T16FunctionalFlight: enter the ID details the airline requiresFields required and validated as per the airline's rules
T17FunctionalEnter contact [email protected] and 9000000001Ticket and updates go to these contacts in the test environment

Fare and payment

IDCategoryTest caseExpected result
T18FunctionalCheck the fare breakdownBase fare, taxes and fees add up to the total charged
T19FunctionalApply a valid, an expired and a not-applicable promo codeValid code reduces the total; others show a specific reason
T20FunctionalPay successfully with a sandbox methodBooking ID or PNR generated; seats marked booked; confirmation sent
T21NegativePayment succeeds but the booking call times outBooking completed later by reconciliation, or an automatic refund; the user is told which
T22NegativePayment failsNo ticket; seats stay held until expiry or are released; user can retry
T23NegativeDouble-click Pay, or press Back and Pay againOne charge and one booking

Waitlist and availability

IDCategoryTest caseExpected result
T24FunctionalTrain: book when only waitlist is availableStatus shows the waitlist position before and after payment
T25FunctionalTrain: a confirmed passenger cancelsWaitlisted bookings move up as the rules say; status updates for the user
T26FunctionalShow or flight fully soldSold-out state; no seat selection or payment possible

Cancellation and changes

IDCategoryTest caseExpected result
T27FunctionalCancel before the refund cut-offRefund amount shown before confirming; refund matches it
T28BoundaryCancel just before and just after the cut-offRefund changes exactly at the cut-off
T29FunctionalCancel one of three passengersOnly that passenger cancelled; refund for that share only
T30FunctionalFlight: change to another dateFare difference and fees shown and charged correctly

Ticket, security and performance

IDCategoryTest caseExpected result
T31FunctionalOpen the e-ticket and booking historyPassenger, seat, date, time and booking ID correct; QR code scans in the test scanner
T32SecurityChange the booking ID in the ticket URL or API to another user'sAccess denied; no ticket details shown
T33SecuritySend many search or booking requests from one client quicklyRate limit or challenge as specified; normal users unaffected
T34PerformanceSimulate the opening of a popular sale with many usersQueueing or throttling works; no seat sold twice; no payment without a booking outcome
T35FunctionalFlight: book a route across time zonesDeparture 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.