A8-StateMachineLab (1)

.docx

School

Centennial College *

*We aren’t endorsed by this school

Course

1212

Subject

Industrial Engineering

Date

May 5, 2024

Type

docx

Pages

15

Uploaded by GeneralExplorationCoyote32

Test Design using state transition diagrams Lab exercise Black Box Tests – Part II Designing test cases using State Transition Diagrams Student names: Abishek Dhakal Id: 301292884 Student name: Sandesh Bhandari Id: 301313075 Contents Q1 (2.5 pts) Draw a state transition diagram for a reservation or booking record ................................................ 3 Q2.a ) List the type of objects that have changing state (1 pts) .............................................................................. 7 Q2. b) Draw state diagrams for each of the object types you identified above. (2.5 pts) ...................................... 8 Q2.c) Identify criteria and define a test case to verify correct handling for four different state transitions. For example, two test cases are listed here. Add four more (1 pts each). (4 pts) ........................................................ 9 Page 1 of 15
Test Design using state transition diagrams Lab exercise Instructions Work in pairs – groups of two – and discuss (create a private chat) with each other as you complete the exercise. Marking This assignment is marked out of 10. It has 2 questions. Question one requires just one diagram is worth 2.5. Question two requires a set of diagrams and four test cases. It is marks out of 7.5. Due Submit in eCentennial your joint solution before next Monday’s class. Question 1 (2.5 pts) You own a small resort of summer cottages and ask a local software developer to create a reservation system you can use to manage bookings. Before accepting the software you test it thoroughly. You have 20 cottages that you refer to as #1, #2 … #20 and operate the resort for 12 weeks over the months of June, July and August. Weekly rental for each cottage is $1000 per week. The rental period is from noon on a Sunday to noon on the following Saturday. You clean and prepare for the next customer each Saturday afternoon and Sunday morning. Assume all customers stay one week. For each of the 20 cottages and each of the 12 weeks, the use cases may occur. Big hint: the states of a reservation are shown in bold. Use cases: To start, the reservation system marks all cottages as available for all weeks. Page 2 of 15
Test Design using state transition diagrams Lab exercise Customers may contact you by phone or email to ask about availability, prices and the like. 1. The system lets you add information about potential customers to your mailing list. A customer contacts you by phone or email to reserve a cottage or a certain week. o If the requested cottage and/or week are not available, you suggest alternatives. o When you and the customer agree on a cottage and week, and the system lets you indicate that the cottage is reserved . Upon reserving, the customer must send you a deposit of $250 if the arrival date is more three weeks ahead. o If the deposit arrives within seven days, the cottage is marked as booked . o If the deposit does not arrive within seven days, the system cancels the reservation and the cottage becomes available for rental to another customer. Full payment is due three weeks before the arrival date. That means a customer who reserved with a deposit of $250 must pay the balance of $750 at least 21 days before arriving. A customer who books late (less than 21 days before arriving) must pay the full amount of $1000 within seven days of reserving. o When the balance of rental payment arrives, the system lets you mark the cottage as rented . o If the balance of rental payment does not arrive 21 days before the arrival date: The system cancels the booking and the cottage becomes available . You keep the deposit (if the customer paid it). A customer may cancel a reservation or booking. o The system lets you indicate the cottage is available again. o If the customer cancels more than 3 months (90 days) before the arrival date, you return all money paid - deposit and balance of payment (if paid). o If the customer cancels between 3 months and 3 weeks of the arrival date (89-21 days) you keep the deposit and return the balance of payment (if paid). o If the customer cancels within 20 days of the arrival date, you keep all money paid. On the arrival date, the cottage becomes occupied . o If the customer does not turn up, you honour the booking anyway, in case the customer arrives late. Q1 (2.5 pts) Draw a state transition diagram for a reservation or booking record. Consider that the diagram is the same for all 20 cottages and all 12 weeks, but shows the state of a booking for one cottage and one week. Page 3 of 15
Test Design using state transition diagrams Lab exercise Hint: Include only use case details that relate to a change of state. Diagram Page 4 of 15
Test Design using state transition diagrams Lab exercise Page 5 of 15
Test Design using state transition diagrams Lab exercise Question 2 (7.5 pts) CC Video store rents movies. You are testing the IT system that maintains the inventory of movies, customers, rentals and reservations. CC Video rents movies by the day, for a fee of $5. All rentals are for one day and the customer pays before taking the movie out of the shop. Returns are due by 6 pm on the next day. Customers return movies by handing the rented copy to staff or dropping it into in a return box. The late fee is $6.00 for every day or part day overdue. Except for high demand movies, the store usually waves the fee for returns just a few hours late. All customers are members. Joining is free, but involves showing ID. The IT system assigns a member number and then uses member number together with last name and phone number to verify identity. All members in good standing (with no unpaid fines) can rent movies. Members can also reserve movies to be picked after 6 pm on the same day. The store must keep enough copies on reserve to satisfy all reservations. Use Cases / Requirements A. A member rents a movie with no reservation. Staff do the following: Validate that the customer is a member Check for outstanding fines. The member must pay all fines before renting. Check that a copy is in stock and available for rental. Take payment and give the member a copy of the movie. Add a loan record to the system. B. A member returns a movie Staff do the following: Check whether the return is late. o If the return is late and the customer is present, waive the fine or make the member pay. o If the return is late and the customer is not present, use the system to add the fine to the member’s record. Remove the loan record from the system. Return the copy of the movie to available stock. C. A member reserves a movie. Staff do the following: Validate that the customer is a member. Check that an unreserved copy is in stock. Page 6 of 15
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help