Lab 7: Question 3

 

Ticket Distributor Test Case

 
     
Test Case Name:   PurchaseTicket_FullRunThrough
Entry Condition:  

The Passenger standing in front of ticket distributor.

The Passenger has three $1 bills and three quarters.

     
Flow of events:  
  1. The Passenger presses in succession the zone buttons A, B, G, and C.
  2. The Distributor should display in succession the prices for each zone; $1.25, $2.50, $0.75 and $3.75.
  3. The Passenger inserts a $1 bill.
  4. The Passenger inserts $0.25 and then presses the zone A button.
  5. The Distributor returns a $1 bill and a quarter.
  6. The Distributor displays $1.25 as the price for a zone A tickect.
  7. The Passenger inserts two $1 bills.
  8. The Distributor returns three quarters and issues a zone A ticket.
  9. The customer selects the zone B button.
  10. The Distributor displays $2.50 as the price for a zone B ticket.
  11. The Passenger inserts a $1 bill and six quarters.12. The Distributor issues a zone B tickect.
   
   
   
   
   
   
   
   
   
Exit Condition:   The Passenger has one zone A tickect and one zone B ticket.
     

Discussion:

  We only needed one test case to cover all states of the Ticket Distrobutor system. Our test case differed from the one on page 361 in that we included testing for the interuption of a transaction and the returning of inserted money. The test case on page 361 did not provide a test for when a Passenger selects another zone before entering the sufficient amount of money. Steps 4 and 5 in our test case tests that when the Passenger cancels the current transaction by selecting another zone, the system returns the money already inserted and displays the amount due for the new zone.