Pet Shop Bots
An online shop sells pet food and accessories. Customers can choose goods and conclude their orders on its 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 either a complete or partial state lifecycle, required to test this system.
Test Cases
Test Case 1 | |||
---|---|---|---|
Action | Order value | Next state | |
Tags
- Quality Assurance
- Specification Analysis
- State Transition
- Test Case Design
Information
Score Distribution
Would you like to see our other questions?
We have 1000+ premium hand-crafted questions for 160+ job skills and 20+ coding languages. We prefer questions with small samples of actual work over academic problems or brain teasers.
Would you like to see our tests?
The following tests contain Quality Assurance related questions:
On the blog
Since we're all biased and we use incorrect proxies, why not just outsource hiring to experts or recruitment agencies? After all, they've been screening people for many years, so they must know how to do it right?
Not really. I was surprised to discover that many experts...