Pet Shop Bots
An online shop sells pet food and accessories. Customers can choose goods and conclude their orders on their website. The order is processed according to these rules:
- A customer enters his or her order and clicks SUBMIT. Depending on its total value, the order is set to either of the following states:
- APPROVED if the value is less than or equal to $100.
- PENDING if the value is greater than $100 and the shop's personnel have to verify the validity of the online payment.
- For PENDING orders, shop personnel can click one of the following:
- APPROVE if the payment is confirmed, thereby setting the order to the state of APPROVED.
- CANCEL if the payment is invalid, thereby setting the order to the state of CANCELED.
- For orders in an APPROVED state, the shop personnel choose the SHIP action after the goods are actually sent, thereby setting the order to a state of SHIPPED.
Prepare the optimal (effective and efficient) set of test cases, each containing a separate state life cycle, required to test this system.