Testcover.com Testcover.com
Tutorial - Shopping Cart Example -
Requirements Summary

Home
Existing User Login
Brochure
Sign up for Risk-Free Trial
About Testcover.com
Frequently Asked Questions
Tutorial with Examples
->Equivalence Partitioning
--->Shopping Cart Example
----->Seq. Unit Replay Design
->UML State Machines
--->Shopping Cart Example
--->Test Models, 1 Region
--->Design Procedure
--->Transition Designs
----->Functionally Dependent
----->Fixed Values
--->Target State Designs
----->Functionally Dependent
----->Fixed Values
--->Thermostat Example
->Definitions of Terms
Performance
WSDL Interface
Background
Partners
Registrations
Contact Information
The shopping cart provides an on-line shopper with a repository for items to purchase, and an interface for updating the items and viewing their cost. When a shopper selects an item and places it in the cart, she is taken to the shopping cart page. Here items can be checked for deletion, and new quantities can be entered. The update button initiates these changes to the items in the cart. The shop button returns to the previous shopping page, and the checkout button presents the interface for shipping and payment. Whan a shopper selects an item that is already in the cart, the quantity of that item is incremented. The update and checkout buttons do not appear when the cart is empty. A cart button returns to the shopping cart from checkout.

The shopping cart operation is described in the UML state machine diagram below.

Three actions are described in pseudocode as follows.

addItem() -- cart state entry
displayNonemptyCart() -- nonemptyCart state entry
updateItems() -- UPDATE transition from nonemptyCart state to cart state

Transitions among four states are to be tested. These are the lowest-level leaf states, emptyCart, nonemptyCart, shopping and checkout. (The shopping and checkout states are not shown above.)

<UML State Machines Shopping Cart Test Models>

Copyright © 2003-2017 Testcover.com, LLC. All rights reserved.