Testcover.com Tutorial - Shopping Cart Example - Target State Design - Fixed Values Form

Home
Brochure
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 example illustrates pairwise testing using a Unified Modeling Language (UML) state machine diagram. This test design is based on the shopping cart diagram. The design illustrates the target state model, in which each partition includes all the transitions leading to a particular target state. Some of the factor values are functionally dependent on the values of other factors. This design is converted from functionally dependent form (above) using the fixed values conversion procedure to insure that all allowed pairs of factor values are covered.

In the shopping cart example there are four leaf states: emptyCart, nonemptyCart, shopping, checkout. There are eight state transitions which are grouped into four partitions according to their target states:

 # all states to emptyCart # all states to nonemptyCart # all states to shopping # all states to checkout

There are 18 test factors with values as follows.

Test FactorNumber of ValuesTest Factor Values
1.newItem4 unset itemA itemB itemC
2.n5 unset 0 1 2 3
3.delChk[0]3 n/a 0 1
4.item[0]4 n/a itemA itemB itemC
5.qty[0]4 n/a 1 2 10
6.newQ[0]5 n/a 0 1 2 10
7.delChk[1]3 n/a 0 1
8.item[1]3 n/a itemB itemC
9.qty[1]4 n/a 1 2 10
10.newQ[1]5 n/a 0 1 2 10
11.delChk[2]3 n/a 0 1
12.item[2]2 n/a itemC
13.qty[2]4 n/a 1 2 10
14.newQ[2]5 n/a 0 1 2 10
15.i4 n/a 0 1 2
16.q5 n/a 0 1 2 10
17.state4 shopping emptyCart nonemptyCart checkout
18.event19 SHOP CART CHECK(0)[0<=i&&i<n] CHECK(1)[0<=i&&i<n] CHECK(2)[0<=i&&i<n]
QTY(0,0)[0<=i&&i<n] QTY(0,1)[0<=i&&i<n] QTY(0,2)[0<=i&&i<n] QTY(0,10)[0<=i&&i<n]
QTY(1,0)[0<=i&&i<n] QTY(1,1)[0<=i&&i<n] QTY(1,2)[0<=i&&i<n] QTY(1,10)[0<=i&&i<n]
QTY(2,0)[0<=i&&i<n] QTY(2,1)[0<=i&&i<n] QTY(2,2)[0<=i&&i<n] QTY(2,10)[0<=i&&i<n]
UPDATE CHECKOUT

The first 16 factors are program variables. Factor 17 is the current state, and factor 18 is the event triggering the expected transition. The newItem value indicates an item to place in the cart; n is the number of items in the cart (up to 3 in this test design). The first 3 items in the cart are indexed by 0, 1 and 2, so factors 3-6 are for the item in position 0, 7-10 for position 1, etc. For each cart position i, delChk[i] indicates whether the delete box is checked; item[i] identifies the item; qty[i] is the quantity of the item; newQ[i] shows a new quantity entered. Factors 15 and 16 give the values for i and q in the CHECK(i) and the QTY(i,q) events. These events are functionally dependent, but in this design their fixed values are given explicitly according to the values of i and q. The value n/a indicates that a factor is not applicable to the transition test case.

The items are placed in the cart starting at position 0. They are constrained to be different, to appear in separate cart positions. Otherwise, the item already in the cart would have its quantity incremented; a new cart position would not be filled. For example, when there are two different items, the test design constrains position 0 to have itemA or itemB; position 1 is constrained to have itemC.

In the shopping-nonemptyCart and checkout-nonemptyCart transitions, qty[0] is used as a value for newQ[0]. This indicates that the value shown for the new quantity is the same as the current quantity. Then newQ[0] is functionally dependent on qty[0]. (If qty[0] is 10, then so is newQ[0].) Factors newQ[1] and newQ[2] have similar dependencies on values of qty[1] and qty[2].

The test design is constructed from the functionally dependent form using the fixed values conversion procedure. Partitions 1, 3 and 4 are the same in both forms because their factor values are given explicitly, without functional dependence. Partition 2 (all states to nonemptyCart) is the only one that differs between the functionally dependent and fixed values forms. The relationship between the two forms of the target state design is presented in the shopping cart mapping table.

The test case generator request is given below. The partition prefix, e.g. E, indicates the target state (emptyCart) for each test case.

 ```Shopping Cart Example - target state design - fixed values form newItem n delChk[0] item[0] qty[0] newQ[0] delChk[1] item[1] qty[1] newQ[1] delChk[2] item[2] qty[2] newQ[2] i q state event #E states to emptyCart + shopping to emptyCart unset unset 0 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a shopping CART + nonemptyCart to emptyCart; n=1; delChk[0]=1 unset 1 1 itemA itemB itemC 1 2 10 0 1 2 10 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a nonemptyCart UPDATE + nonemptyCart to emptyCart; n=1; newQ[0]=0 unset 1 0 1 itemA itemB itemC 1 2 10 0 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a nonemptyCart UPDATE + nonemptyCart to emptyCart; n=2; delChk[0]=1; newQ[1]=0 unset 2 1 itemA itemB 1 2 10 0 1 2 10 0 1 itemC 1 2 10 0 n/a n/a n/a n/a n/a n/a nonemptyCart UPDATE + nonemptyCart to emptyCart; n=3; delChk[0]=1; delChk[1]=1; newQ[2]=0 unset 3 1 itemA 1 2 10 0 1 2 10 1 itemB 1 2 10 0 1 2 10 0 1 itemC 1 2 10 0 n/a n/a nonemptyCart UPDATE #N states to nonemptyCart + shopping to nonemptyCart; no items yet itemA itemB itemC unset 0 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=1; newQ[0]=qty[0]=1 itemA itemB itemC 1 0 itemA itemB itemC 1 1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=1; newQ[0]=qty[0]=2 itemA itemB itemC 1 0 itemA itemB itemC 2 2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=1; newQ[0]=qty[0]=10 itemA itemB itemC 1 0 itemA itemB itemC 10 10 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=1; newQ[1]=qty[1]=1 itemA itemB itemC 2 0 itemA itemB 1 1 0 itemC 1 1 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=1; newQ[1]=qty[1]=2 itemA itemB itemC 2 0 itemA itemB 1 1 0 itemC 2 2 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=1; newQ[1]=qty[1]=10 itemA itemB itemC 2 0 itemA itemB 1 1 0 itemC 10 10 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=2; newQ[1]=qty[1]=1 itemA itemB itemC 2 0 itemA itemB 2 2 0 itemC 1 1 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=2; newQ[1]=qty[1]=2 itemA itemB itemC 2 0 itemA itemB 2 2 0 itemC 2 2 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=2; newQ[1]=qty[1]=10 itemA itemB itemC 2 0 itemA itemB 2 2 0 itemC 10 10 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=10; newQ[1]=qty[1]=1 itemA itemB itemC 2 0 itemA itemB 10 10 0 itemC 1 1 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=10; newQ[1]=qty[1]=2 itemA itemB itemC 2 0 itemA itemB 10 10 0 itemC 2 2 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=2; newQ[0]=qty[0]=10; newQ[1]=qty[1]=10 itemA itemB itemC 2 0 itemA itemB 10 10 0 itemC 10 10 n/a n/a n/a n/a n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=1; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 1 1 0 itemB 1 1 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=1; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 1 1 0 itemB 1 1 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=1; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 1 1 0 itemB 1 1 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=2; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 1 1 0 itemB 2 2 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=2; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 1 1 0 itemB 2 2 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=2; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 1 1 0 itemB 2 2 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=10; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 1 1 0 itemB 10 10 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=10; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 1 1 0 itemB 10 10 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=1; newQ[1]=qty[1]=10; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 1 1 0 itemB 10 10 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=1; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 2 2 0 itemB 1 1 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=1; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 2 2 0 itemB 1 1 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=1; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 2 2 0 itemB 1 1 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=2; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 2 2 0 itemB 2 2 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=2; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 2 2 0 itemB 2 2 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=2; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 2 2 0 itemB 2 2 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=10; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 2 2 0 itemB 10 10 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=10; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 2 2 0 itemB 10 10 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=2; newQ[1]=qty[1]=10; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 2 2 0 itemB 10 10 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=1; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 10 10 0 itemB 1 1 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=1; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 10 10 0 itemB 1 1 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=1; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 10 10 0 itemB 1 1 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=2; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 10 10 0 itemB 2 2 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=2; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 10 10 0 itemB 2 2 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=2; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 10 10 0 itemB 2 2 0 itemC 10 10 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=10; newQ[2]=qty[2]=1 itemA itemB itemC 3 0 itemA 10 10 0 itemB 10 10 0 itemC 1 1 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=10; newQ[2]=qty[2]=2 itemA itemB itemC 3 0 itemA 10 10 0 itemB 10 10 0 itemC 2 2 n/a n/a shopping CART + shopping to nonemptyCart; n=3; newQ[0]=qty[0]=10; newQ[1]=qty[1]=10; newQ[2]=qty[2]=10 itemA itemB itemC 3 0 itemA 10 10 0 itemB 10 10 0 itemC 10 10 n/a n/a shopping CART + nonemptyCart to nonemptyCart; n=1; CHECK(0) unset 1 0 1 itemA itemB itemC 1 2 10 0 1 2 10 n/a n/a n/a n/a n/a n/a n/a n/a 0 n/a nonemptyCart CHECK(0)[0<=i&&i

The shopping cart target state design has 217 test cases in 4 partitions in fixed values form. Partition 2 is the only partition that differs from functionally dependent form. All test cases start with an empty cart. The results tables follow.

#1. states to emptyCart
Test
Case ID
newItem n delChk[0] item[0] qty[0] newQ[0] delChk[1] item[1] qty[1] newQ[1] delChk[2] item[2] qty[2] newQ[2] i q state event Combo
Countdown
1 Value5 Values3 Values4 Values4 Values5 Values3 Values3 Values4 Values5 Values3 Values2 Values4 Values2 Values1 Value1 Value2 Values2 Values1361
E1unsetunsetn/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART1208
E2unset31itemA111itemB1101itemC100n/an/anonemptyCartUPDATE1058
E3unset21itemB201itemC20n/an/an/an/an/an/anonemptyCartUPDATE944
E4unset11itemC102n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE870
E5unset31itemA2101itemB110itemC10n/an/anonemptyCartUPDATE802
E6unset31itemA1101itemB1021itemC20n/an/anonemptyCartUPDATE752
E7unset21itemA1100itemC10n/an/an/an/an/an/anonemptyCartUPDATE707
E8unset10itemB10n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE673
E9unset31itemA1021itemB2101itemC10n/an/anonemptyCartUPDATE643
E10unset21itemA210itemC100n/an/an/an/an/an/anonemptyCartUPDATE623
E11unset0n/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART606
E12unset31itemA101itemB100itemC10n/an/anonemptyCartUPDATE590
E13unset11itemA210n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE575
E14unset31itemA221itemB1020itemC100n/an/anonemptyCartUPDATE563
E15unset31itemA121itemB210itemC20n/an/anonemptyCartUPDATE553
E16unset21itemA1020itemC20n/an/an/an/an/an/anonemptyCartUPDATE544
E17unset31itemA1001itemB121itemC20n/an/anonemptyCartUPDATE535
E18unset31itemA1011itemB220itemC10n/an/anonemptyCartUPDATE527
E19unset11itemC11n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE520
E20unset31itemA10101itemB201itemC100n/an/anonemptyCartUPDATE513
E21unset31itemA1011itemB1011itemC100n/an/anonemptyCartUPDATE507
E22unset31itemA2101itemB10100itemC20n/an/anonemptyCartUPDATE501
E23unset10itemC20n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE497
E24unset21itemB1011itemC10n/an/an/an/an/an/anonemptyCartUPDATE494
E25unset31itemA211itemB1001itemC20n/an/anonemptyCartUPDATE491
E26unset31itemA101itemB10101itemC10n/an/anonemptyCartUPDATE488
E27unset21itemB121itemC100n/an/an/an/an/an/anonemptyCartUPDATE486
E28unset31itemA201itemB211itemC100n/an/anonemptyCartUPDATE484
E29unset11itemB1010n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE483
E30unset11itemC110n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE482
E31unset10itemC100n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE481
E32unset10itemA20n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE480
E33unset21itemA100itemC10n/an/an/an/an/an/anonemptyCartUPDATE479
E34unset21itemB110itemC20n/an/an/an/an/an/anonemptyCartUPDATE478
E35unset21itemA220itemC10n/an/an/an/an/an/anonemptyCartUPDATE477

The test cases in partition 1 test the allowed transitions from all states to the emptyCart state with all allowed pairs of factor values. Test case E7 is set up as illustrated below.

The items already in the cart are constrained to be different, to appear in separate cart positions, and blocks with the UPDATE event are constrained to yield an empty cart.

E7 is set up by placing itemA and itemC in the cart from the shopping page. The delete box is checked for itemA, and a new quantity 10 is entered. A new quantity 0 is entered for itemC. The update button is clicked to trigger the transition to emptyCart.

#2. states to nonemptyCart
Test
Case ID
newItem n delChk[0] item[0] qty[0] newQ[0] delChk[1] item[1] qty[1] newQ[1] delChk[2] item[2] qty[2] newQ[2] i q state event Combo
Countdown
4 Values5 Values3 Values4 Values4 Values5 Values3 Values3 Values4 Values5 Values3 Values2 Values4 Values5 Values4 Values5 Values3 Values17 Values3165
N1itemAunsetn/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART3012
N2unset30itemA100itemB100itemC100n/anonemptyCartCHECK(0)[0<=i&&i<n]2859
N3unset21itemB201itemC21n/an/an/an/a10nonemptyCartQTY(1,0)[0<=i&&i<n]2715
N4unset31itemA10101itemB10101itemC10021nonemptyCartQTY(2,1)[0<=i&&i<n]2588
N5itemB30itemA220itemB220itemC22n/an/ashoppingCART2470
N6unset11itemC11n/an/an/an/an/an/an/an/a02nonemptyCartQTY(0,2)[0<=i&&i<n]2365
N7itemC20itemB10100itemC1010n/an/an/an/an/an/ashoppingCART2270
N8unset31itemA111itemB121itemC110110nonemptyCartQTY(1,10)[0<=i&&i<n]2187
N9unset30itemA1020itemB1010itemC101022nonemptyCartQTY(2,2)[0<=i&&i<n]2121
N10unset31itemA1021itemB101itemC2200nonemptyCartQTY(0,0)[0<=i&&i<n]2060
N11unset20itemA120itemC22n/an/an/an/a01nonemptyCartQTY(0,1)[0<=i&&i<n]2004
N12unset30itemA110itemB110itemC11n/an/acheckoutCART1950
N13unset10itemC100n/an/an/an/an/an/an/an/a010nonemptyCartQTY(0,10)[0<=i&&i<n]1900
N14unset30itemA1100itemB1020itemC2120nonemptyCartQTY(2,0)[0<=i&&i<n]1857
N15unset31itemA2101itemB201itemC21012nonemptyCartQTY(1,2)[0<=i&&i<n]1817
N16unset30itemA210itemB2100itemC22210nonemptyCartQTY(2,10)[0<=i&&i<n]1778
N17unset10itemB22n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE1742
N18unset20itemA100itemC10n/an/an/an/a11nonemptyCartQTY(1,1)[0<=i&&i<n]1707
N19unset31itemA1011itemB1000itemC1012n/anonemptyCartCHECK(2)[0<=i&&i<n]1672
N20unset31itemA121itemB1101itemC111n/anonemptyCartCHECK(1)[0<=i&&i<n]1642
N21itemB0n/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART1613
N22unset30itemA1101itemB111itemC1202nonemptyCartQTY(0,2)[0<=i&&i<n]1586
N23itemA30itemA110itemB110itemC1010n/an/ashoppingCART1560
N24unset11itemB210n/an/an/an/an/an/an/an/a00nonemptyCartQTY(0,0)[0<=i&&i<n]1536
N25unset31itemA1001itemB1021itemC102010nonemptyCartQTY(0,10)[0<=i&&i<n]1512
N26unset31itemA201itemB211itemC2101nonemptyCartQTY(0,1)[0<=i&&i<n]1491
N27unset31itemA101itemB10100itemC110n/an/anonemptyCartUPDATE1471
N28unset20itemB1000itemC102n/an/an/an/a110nonemptyCartQTY(1,10)[0<=i&&i<n]1453
N29unset10itemC22n/an/an/an/an/an/an/an/an/an/acheckoutCART1435
N30unset11itemA21n/an/an/an/an/an/an/an/a0n/anonemptyCartCHECK(0)[0<=i&&i<n]1418
N31unset31itemA211itemB1011itemC1020nonemptyCartQTY(2,0)[0<=i&&i<n]1401
N32unset21itemB221itemC110n/an/an/an/a12nonemptyCartQTY(1,2)[0<=i&&i<n]1385
N33unset10itemB101n/an/an/an/an/an/an/an/a01nonemptyCartQTY(0,1)[0<=i&&i<n]1369
N34unset31itemA220itemB221itemC2002nonemptyCartQTY(0,2)[0<=i&&i<n]1354
N35unset31itemA10101itemB10101itemC10010nonemptyCartQTY(1,0)[0<=i&&i<n]1339
N36unset30itemA210itemB2100itemC2211nonemptyCartQTY(1,1)[0<=i&&i<n]1325
N37unset20itemA211itemC100n/an/an/an/a1n/anonemptyCartCHECK(1)[0<=i&&i<n]1312
N38itemC30itemA110itemB110itemC11n/an/ashoppingCART1299
N39unset31itemA10101itemB210itemC11210nonemptyCartQTY(2,10)[0<=i&&i<n]1286
N40unset30itemA100itemB100itemC1021nonemptyCartQTY(2,1)[0<=i&&i<n]1275
N41itemC10itemC22n/an/an/an/an/an/an/an/an/an/ashoppingCART1265
N42unset31itemA201itemB211itemC2122nonemptyCartQTY(2,2)[0<=i&&i<n]1255
N43unset30itemA1020itemB1010itemC101000nonemptyCartQTY(0,0)[0<=i&&i<n]1246
N44unset21itemB221itemC110n/an/an/an/a010nonemptyCartQTY(0,10)[0<=i&&i<n]1237
N45unset31itemA10101itemB10101itemC10011nonemptyCartQTY(1,1)[0<=i&&i<n]1229
N46unset31itemA220itemB221itemC202n/anonemptyCartCHECK(2)[0<=i&&i<n]1221
N47itemB20itemB110itemC11n/an/an/an/an/an/ashoppingCART1213
N48unset31itemA2100itemB101itemC100110nonemptyCartQTY(1,10)[0<=i&&i<n]1205
N49unset30itemA1100itemB1020itemC2112nonemptyCartQTY(1,2)[0<=i&&i<n]1198
N50unset30itemA1101itemB111itemC122n/anonemptyCartCHECK(2)[0<=i&&i<n]1191
N51unset31itemA1001itemB1021itemC1020n/anonemptyCartCHECK(0)[0<=i&&i<n]1184
N52unset21itemB1021itemC100n/an/an/an/a02nonemptyCartQTY(0,2)[0<=i&&i<n]1177
N53itemA20itemB220itemC22n/an/an/an/an/an/ashoppingCART1170
N54unset20itemB1010itemC12n/an/an/an/an/an/anonemptyCartUPDATE1163
N55unset20itemB10100itemC22n/an/an/an/an/an/acheckoutCART1156
N56unset30itemA210itemB2100itemC2210nonemptyCartQTY(1,0)[0<=i&&i<n]1150
N57unset30itemA1020itemB1010itemC10101n/anonemptyCartCHECK(1)[0<=i&&i<n]1144
N58itemA30itemA10100itemB10100itemC11n/an/ashoppingCART1138
N59itemB30itemA10100itemB10100itemC11n/an/ashoppingCART1132
N60unset30itemA101itemB2101itemC101020nonemptyCartQTY(2,0)[0<=i&&i<n]1126
N61unset31itemA2101itemB201itemC210010nonemptyCartQTY(0,10)[0<=i&&i<n]1121
N62unset31itemA121itemB1101itemC1110nonemptyCartQTY(1,0)[0<=i&&i<n]1116
N63unset30itemA210itemB2100itemC22110nonemptyCartQTY(1,10)[0<=i&&i<n]1111
N64unset20itemA120itemC22n/an/an/an/a00nonemptyCartQTY(0,0)[0<=i&&i<n]1106
N65unset30itemA100itemB100itemC1001nonemptyCartQTY(0,1)[0<=i&&i<n]1101
N66itemCunsetn/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART1096
N67unset21itemB201itemC21n/an/an/an/a0n/anonemptyCartCHECK(0)[0<=i&&i<n]1091
N68unset31itemA1021itemB101itemC2220nonemptyCartQTY(2,0)[0<=i&&i<n]1086
N69unset31itemA201itemB211itemC2121nonemptyCartQTY(2,1)[0<=i&&i<n]1081
N70unset30itemA100itemB100itemC1022nonemptyCartQTY(2,2)[0<=i&&i<n]1076
N71unset30itemA100itemB100itemC10210nonemptyCartQTY(2,10)[0<=i&&i<n]1071
N72unset31itemA2100itemB210itemC22n/an/anonemptyCartUPDATE1066
N73unset30itemA101itemB2101itemC101002nonemptyCartQTY(0,2)[0<=i&&i<n]1062
N74unset31itemA211itemB1011itemC10010nonemptyCartQTY(0,10)[0<=i&&i<n]1058
N75unset31itemA1001itemB1021itemC10212nonemptyCartQTY(1,2)[0<=i&&i<n]1054
N76itemC30itemA110itemB220itemC22n/an/ashoppingCART1050
N77unset31itemA220itemB221itemC201n/anonemptyCartCHECK(1)[0<=i&&i<n]1046
N78unset11itemC1010n/an/an/an/an/an/an/an/a01nonemptyCartQTY(0,1)[0<=i&&i<n]1042
N79unset30itemA101itemB2101itemC101001nonemptyCartQTY(0,1)[0<=i&&i<n]1038
N80unset31itemA211itemB1011itemC1012nonemptyCartQTY(1,2)[0<=i&&i<n]1034
N81unset31itemA1001itemB1021itemC102210nonemptyCartQTY(2,10)[0<=i&&i<n]1030
N82unset30itemA110itemB10100itemC22n/an/acheckoutCART1026
N83unset30itemA101itemB2101itemC10102n/anonemptyCartCHECK(2)[0<=i&&i<n]1023
N84unset31itemA121itemB1101itemC110n/anonemptyCartCHECK(0)[0<=i&&i<n]1020
N85unset31itemA2101itemB201itemC2100n/anonemptyCartCHECK(0)[0<=i&&i<n]1017
N86unset10itemC100n/an/an/an/an/an/an/an/a00nonemptyCartQTY(0,0)[0<=i&&i<n]1014
N87unset31itemA211itemB1011itemC1000nonemptyCartQTY(0,0)[0<=i&&i<n]1011
N88unset31itemA111itemB121itemC11011nonemptyCartQTY(1,1)[0<=i&&i<n]1008
N89unset31itemA111itemB121itemC11021nonemptyCartQTY(2,1)[0<=i&&i<n]1005
N90unset30itemA210itemB2100itemC2222nonemptyCartQTY(2,2)[0<=i&&i<n]1002
N91unset31itemA210itemB100itemC1010n/an/anonemptyCartUPDATE999
N92unset20itemA120itemC22n/an/an/an/a010nonemptyCartQTY(0,10)[0<=i&&i<n]997
N93unset31itemA1011itemB1000itemC101010nonemptyCartQTY(0,10)[0<=i&&i<n]995
N94itemB10itemC11n/an/an/an/an/an/an/an/an/an/ashoppingCART993
N95itemA10itemC11n/an/an/an/an/an/an/an/an/an/ashoppingCART991
N96itemA30itemA110itemB110itemC22n/an/ashoppingCART989
N97itemB30itemA110itemB110itemC1010n/an/ashoppingCART987
N98itemC30itemA110itemB110itemC1010n/an/ashoppingCART985
N99unset21itemB201itemC21n/an/an/an/a1n/anonemptyCartCHECK(1)[0<=i&&i<n]983
N100unset30itemA1101itemB111itemC121n/anonemptyCartCHECK(1)[0<=i&&i<n]981
N101unset21itemB201itemC21n/an/an/an/a11nonemptyCartQTY(1,1)[0<=i&&i<n]979
N102unset20itemA1020itemC101n/an/an/an/a110nonemptyCartQTY(1,10)[0<=i&&i<n]977
N103unset31itemA121itemB1101itemC1100nonemptyCartQTY(0,0)[0<=i&&i<n]975
N104unset31itemA1001itemB1021itemC10201nonemptyCartQTY(0,1)[0<=i&&i<n]973
N105unset31itemA1011itemB1000itemC10102nonemptyCartQTY(0,2)[0<=i&&i<n]971
N106unset31itemA111itemB121itemC11010nonemptyCartQTY(1,0)[0<=i&&i<n]969
N107unset31itemA121itemB1101itemC1111nonemptyCartQTY(1,1)[0<=i&&i<n]967
N108unset31itemA1021itemB101itemC2221nonemptyCartQTY(2,1)[0<=i&&i<n]965
N109unset30itemA1100itemB1020itemC2122nonemptyCartQTY(2,2)[0<=i&&i<n]963
N110unset30itemA1020itemB1010itemC1010210nonemptyCartQTY(2,10)[0<=i&&i<n]961
N111unset30itemA110itemB110itemC1010n/an/acheckoutCART959
N112itemBunsetn/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART958
N113itemA0n/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART957
N114itemC0n/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART956
N115unset10itemC100n/an/an/an/an/an/an/an/a0n/anonemptyCartCHECK(0)[0<=i&&i<n]955
N116unset20itemA100itemC10n/an/an/an/a10nonemptyCartQTY(1,0)[0<=i&&i<n]954
N117unset31itemA201itemB211itemC21110nonemptyCartQTY(1,10)[0<=i&&i<n]953
N118unset10itemC1010n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE952
N119unset30itemA221itemB1020itemC21n/an/anonemptyCartUPDATE951

The test cases in partition 2 test the allowed transitions from all states to the nonemptyCart state with all allowed pairs of factor values. Test cases N2, N4, N5, N12 and N27 are set up as illustrated below.

The items already in the cart are constrained to be different, to appear in separate cart positions, and blocks with the UPDATE event are constrained not to yield an empty cart. In addition the values for newQ[0], newQ[1] and newQ[2] are constrained to be the fixed values of qty[0], qty[1] and qty[2] respectively for transitions from shopping and checkout. This is because the exit action of the cart state sets newQ[i] equal to qty[i]. (Any new quantity entered is abandoned if the cart is not updated.) So the value for newQ[i] is constrained to be the same as qty[i] before the transition back to nonemptyCart.

The events CHECK(i) and QTY(i,q) are expressed in terms of the fixed values of i and q as well. The fixed values conversion procedure is used to convert the functionally dependent values, qty[0], qty[1], qty[2], CHECK(i) and QTY(i,q), to fixed values form.

N2 is set up by placing itemA, itemB and itemC in the cart from the shopping page. New quantities of 0 for itemA, 0 for itemB and 0 for itemC are entered. The delete box is checked for itemA to trigger the transition to nonemptyCart.

N4 is set up by placing itemA, itemB and itemC in the cart from the shopping page. New quantities of 10 for itemA, 10 for itemB and 10 for itemC are entered; the update button is clicked. The delete boxes are checked for itemA, itemB and itemC. A new quantity of 0 is entered for itemC. Another new quantity of 1 is entered for itemC to trigger the transition to nonemptyCart.

N5 is set up by placing itemA, itemB and itemC in the cart from the shopping page. New quantities of 2 for itemA, 2 for itemB and 2 for itemC are entered; the update button is clicked. The shop button is clicked, and then another itemB is placed in the cart from the shopping page to trigger the transition to nonemptyCart.

N12 is set up by placing itemA, itemB and itemC in the cart from the shopping page. The checkout button is clicked, and then the cart button is clicked to trigger the transition to nonemptyCart.

N27 is set up by placing itemA, itemB and itemC in the cart from the shopping page. A new quantity of 10 is entered for itemB, and the update button is clicked. The delete boxes are checked for itemA and itemB. New quantities of 0 for itemA and 10 for itemC are entered. The update button is clicked to trigger the transition to nonemptyCart.

#3. states to shopping
Test
Case ID
newItem n delChk[0] item[0] qty[0] newQ[0] delChk[1] item[1] qty[1] newQ[1] delChk[2] item[2] qty[2] newQ[2] i q state event Combo
Countdown
1 Value4 Values3 Values4 Values4 Values5 Values3 Values3 Values4 Values5 Values3 Values2 Values4 Values5 Values1 Value1 Value2 Values1 Value1411
S1unset0n/an/an/an/an/an/an/an/an/an/an/an/an/an/aemptyCartSHOP1258
S2unset30itemA100itemB100itemC10n/an/anonemptyCartSHOP1111
S3unset21itemB201itemC21n/an/an/an/an/an/anonemptyCartSHOP995
S4unset31itemA10101itemB10101itemC100n/an/anonemptyCartSHOP898
S5unset30itemA210itemB2100itemC22n/an/anonemptyCartSHOP831
S6unset10itemC22n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP767
S7unset20itemA2100itemC102n/an/an/an/an/an/anonemptyCartSHOP718
S8unset30itemA1020itemB1010itemC1010n/an/anonemptyCartSHOP674
S9unset31itemA121itemB1101itemC11n/an/anonemptyCartSHOP638
S10unset21itemB1011itemC12n/an/an/an/an/an/anonemptyCartSHOP606
S11unset11itemC11n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP583
S12unset31itemA2101itemB201itemC210n/an/anonemptyCartSHOP561
S13unset31itemA1001itemB1021itemC102n/an/anonemptyCartSHOP543
S14unset30itemA1101itemB111itemC12n/an/anonemptyCartSHOP528
S15unset21itemB1021itemC100n/an/an/an/an/an/anonemptyCartSHOP514
S16unset30itemA1100itemB1020itemC21n/an/anonemptyCartSHOP500
S17unset10itemC100n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP488
S18unset11itemB210n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP477
S19unset31itemA220itemB221itemC20n/an/anonemptyCartSHOP466
S20unset21itemB1101itemC1010n/an/an/an/an/an/anonemptyCartSHOP456
S21unset31itemA1011itemB1000itemC101n/an/anonemptyCartSHOP446
S22unset31itemA111itemB121itemC110n/an/anonemptyCartSHOP438
S23unset31itemA201itemB211itemC21n/an/anonemptyCartSHOP432
S24unset30itemA101itemB2101itemC1010n/an/anonemptyCartSHOP426
S25unset10itemA10n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP421
S26unset31itemA211itemB1011itemC10n/an/anonemptyCartSHOP416
S27unset31itemA1021itemB101itemC22n/an/anonemptyCartSHOP412
S28unset31itemA2100itemB101itemC100n/an/anonemptyCartSHOP409
S29unset31itemA10101itemB210itemC11n/an/anonemptyCartSHOP406
S30unset20itemB1000itemC102n/an/an/an/an/an/anonemptyCartSHOP404
S31unset11itemC1010n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP403

The test cases in partition 3 test the allowed transitions from all states to the shopping state with all allowed pairs of factor values. Test case S3 is set up as illustrated below.

The items already in the cart are constrained to be different, to appear in separate cart positions.

S3 is set up by placing itemB and itemC in the cart from the shopping page. New quantities of 2 for itemB and 2 for itemC are entered, and the update button is clicked. The delete boxes are checked for itemB and itemC. New quantities of 0 for itemB and 1 for itemC are entered. The shop button is clicked to trigger the transition to shopping.

#4. states to checkout
Test
Case ID
newItem n delChk[0] item[0] qty[0] newQ[0] delChk[1] item[1] qty[1] newQ[1] delChk[2] item[2] qty[2] newQ[2] i q state event Combo
Countdown
1 Value3 Values2 Values3 Values3 Values4 Values3 Values3 Values4 Values5 Values3 Values2 Values4 Values5 Values1 Value1 Value1 Value1 Value1118
C1unset10itemA10n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT965
C2unset31itemA1011itemB1000itemC101n/an/anonemptyCartCHECKOUT827
C3unset31itemA220itemB221itemC20n/an/anonemptyCartCHECKOUT719
C4unset21itemB10101itemC11n/an/an/an/an/an/anonemptyCartCHECKOUT620
C5unset30itemA1101itemB111itemC12n/an/anonemptyCartCHECKOUT555
C6unset20itemA1010itemC210n/an/an/an/an/an/anonemptyCartCHECKOUT508
C7unset30itemA101itemB2101itemC1010n/an/anonemptyCartCHECKOUT470
C8unset10itemC22n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT433
C9unset20itemB1000itemC102n/an/an/an/an/an/anonemptyCartCHECKOUT405
C10unset30itemA100itemB100itemC10n/an/anonemptyCartCHECKOUT381
C11unset11itemC1010n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT363
C12unset30itemA1100itemB1020itemC21n/an/anonemptyCartCHECKOUT345
C13unset31itemA211itemB1011itemC10n/an/anonemptyCartCHECKOUT329
C14unset31itemA1021itemB101itemC22n/an/anonemptyCartCHECKOUT314
C15unset30itemA1020itemB1010itemC1010n/an/anonemptyCartCHECKOUT300
C16unset21itemB221itemC110n/an/an/an/an/an/anonemptyCartCHECKOUT288
C17unset31itemA111itemB121itemC110n/an/anonemptyCartCHECKOUT276
C18unset10itemB101n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT265
C19unset31itemA201itemB211itemC21n/an/anonemptyCartCHECKOUT254
C20unset30itemA210itemB2100itemC22n/an/anonemptyCartCHECKOUT243
C21unset20itemA10100itemC20n/an/an/an/an/an/anonemptyCartCHECKOUT234
C22unset31itemA121itemB1101itemC11n/an/anonemptyCartCHECKOUT227
C23unset31itemA10101itemB10101itemC100n/an/anonemptyCartCHECKOUT220
C24unset31itemA2101itemB201itemC210n/an/anonemptyCartCHECKOUT214
C25unset31itemA1001itemB1021itemC102n/an/anonemptyCartCHECKOUT209
C26unset21itemB110itemC101n/an/an/an/an/an/anonemptyCartCHECKOUT206
C27unset11itemC11n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT204
C28unset31itemA2100itemB101itemC100n/an/anonemptyCartCHECKOUT202
C29unset31itemA10101itemB210itemC11n/an/anonemptyCartCHECKOUT200
C30unset10itemC100n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT199
C31unset21itemB201itemC21n/an/an/an/an/an/anonemptyCartCHECKOUT198
C32unset21itemB1021itemC100n/an/an/an/an/an/anonemptyCartCHECKOUT197

The test cases in partition 4 test the allowed transitions from all states to the checkout state with all allowed pairs of factor values. Test case C4 is set up as illustrated below.

The items already in the cart are constrained to be different, to appear in separate cart positions.

C4 is set up by placing itemB and itemC in the cart from the shopping page. A new quantity 10 is entered for itemB, and the update button is clicked. The delete boxes are checked for itemB and for itemC. The checkout button is clicked to trigger the transition to checkout.