Testcover.com Tutorial - Shopping Cart Example - Transition 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 transition model, in which each state transition has one partition. 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 corresponding to partitions:

 # shopping to emptyCart # nonemptyCart to emptyCart # shopping to nonemptyCart # nonemptyCart to nonemptyCart # checkout to nonemptyCart # emptyCart to shopping # nonemptyCart to shopping # nonemptyCart 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]6 n/a 0 1 2 10 qty[0]
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]6 n/a 0 1 2 10 qty[1]
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]6 n/a 0 1 2 10 qty[2]
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].

When the value of newQ[0] is determined by qty[0] (in partitions 3 and 5 below), newQ[0] has one determinant factor specifying all its values in the partition. That is, newQ[0] is determined by one function of one factor. In this case the functionally dependent form is equivalent to the fixed values form: Both forms yield test cases covering the same values and pairs, so specifying the explicit values of qty[0] in the request is optional. Similarly, newQ[1] and newQ[2] are each determined by one function of one factor. In this design, the fixed values for newQ[0], newQ[1] and newQ[2] are given implicitly by qty[0], qty[1] and qty[2].

The test design is constructed from the functionally dependent form using the fixed values conversion procedure. Partitions 1-2 and 6-8 are the same in both forms because their factor values are given explicitly, without functional dependence. Partitions 3 and 5 are the same in both forms because each of newQ[0], newQ[1] and newQ[2] is one function of one factor; the other factor values are given explicitly. Partition 4 (nonemptyCart to nonemptyCart) is the only one that differs between the functionally dependent and fixed values forms. The relationship between the two forms of the transition design is presented in the shopping cart mapping table.

The test case generator request is given below. The partition prefix, e.g. SE, indicates the transition (shopping to emptyCart) for each test case.

 ```Shopping Cart Example - transition 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 #SE shopping 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 #NE nonemptyCart to emptyCart + 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 #SN shopping to nonemptyCart + shopping to nonemptyCart; no items yet itemA itemB itemC unset 0 n/a n/a n/a qty[0] n/a n/a n/a qty[1] n/a n/a n/a qty[2] n/a n/a shopping CART + shopping to nonemptyCart; n=1 itemA itemB itemC 1 0 itemA itemB itemC 1 2 10 qty[0] n/a n/a n/a qty[1] n/a n/a n/a qty[2] n/a n/a shopping CART + shopping to nonemptyCart; n=2 itemA itemB itemC 2 0 itemA itemB 1 2 10 qty[0] 0 itemC 1 2 10 qty[1] n/a n/a n/a qty[2] n/a n/a shopping CART + shopping to nonemptyCart; n=3 itemA itemB itemC 3 0 itemA 1 2 10 qty[0] 0 itemB 1 2 10 qty[1] 0 itemC 1 2 10 qty[2] n/a n/a shopping CART #NN nonemptyCart to nonemptyCart + 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 transition design has 234 test cases in 8 partitions in fixed values form. Partition 4 is the only partition that differs from functionally dependent form. All test cases start with an empty cart. The results tables follow.

#1. shopping 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 Value2 Values1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value170
SE1unsetunsetn/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART17
SE2unset0n/an/an/an/an/an/an/an/an/an/an/an/an/an/ashoppingCART0

The test cases in partition 1 test the CART transition from the shopping state to the emptyCart state.

#2. nonemptyCart 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 Value3 Values2 Values3 Values3 Values4 Values3 Values3 Values4 Values5 Values3 Values2 Values4 Values2 Values1 Value1 Value1 Value1 Value986
NE1unset11itemA10n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE833
NE2unset31itemA10101itemB201itemC100n/an/anonemptyCartUPDATE701
NE3unset21itemA210itemC100n/an/an/an/an/an/anonemptyCartUPDATE610
NE4unset31itemA121itemB210itemC20n/an/anonemptyCartUPDATE542
NE5unset31itemA101itemB10101itemC10n/an/anonemptyCartUPDATE494
NE6unset21itemB1011itemC10n/an/an/an/an/an/anonemptyCartUPDATE447
NE7unset10itemC100n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE408
NE8unset31itemA221itemB1020itemC100n/an/anonemptyCartUPDATE378
NE9unset31itemA111itemB1101itemC100n/an/anonemptyCartUPDATE359
NE10unset21itemA1020itemC20n/an/an/an/an/an/anonemptyCartUPDATE342
NE11unset11itemB21n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE326
NE12unset21itemA1100itemC10n/an/an/an/an/an/anonemptyCartUPDATE312
NE13unset31itemA2101itemB110itemC10n/an/anonemptyCartUPDATE300
NE14unset31itemA1001itemB121itemC20n/an/anonemptyCartUPDATE290
NE15unset31itemA1011itemB220itemC10n/an/anonemptyCartUPDATE281
NE16unset11itemC110n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE273
NE17unset21itemB201itemC20n/an/an/an/an/an/anonemptyCartUPDATE265
NE18unset31itemA2101itemB10100itemC20n/an/anonemptyCartUPDATE257
NE19unset11itemB12n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE250
NE20unset31itemA1011itemB1011itemC100n/an/anonemptyCartUPDATE244
NE21unset31itemA1021itemB2101itemC10n/an/anonemptyCartUPDATE239
NE22unset31itemA211itemB1001itemC20n/an/anonemptyCartUPDATE236
NE23unset31itemA101itemB100itemC10n/an/anonemptyCartUPDATE233
NE24unset10itemA20n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE231
NE25unset10itemB10n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE229
NE26unset21itemB10101itemC100n/an/an/an/an/an/anonemptyCartUPDATE227
NE27unset31itemA201itemB211itemC100n/an/anonemptyCartUPDATE225
NE28unset31itemA1101itemB1021itemC20n/an/anonemptyCartUPDATE223
NE29unset11itemC102n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE222
NE30unset11itemC11n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE221
NE31unset11itemC20n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE220
NE32unset21itemA100itemC10n/an/an/an/an/an/anonemptyCartUPDATE219
NE33unset21itemB110itemC20n/an/an/an/an/an/anonemptyCartUPDATE218
NE34unset21itemA220itemC10n/an/an/an/an/an/anonemptyCartUPDATE217

The test cases in partition 2 test the UPDATE transitions from the nonemptyCart state to the emptyCart state with all allowed pairs of factor values. Test case NE3 is set up as illustrated below.

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

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

#3. shopping 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
3 Values5 Values2 Values4 Values4 Values1 Value2 Values3 Values4 Values1 Value2 Values2 Values4 Values1 Value1 Value1 Value1 Value1 Value817
SN1itemAunsetn/an/an/aqty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART664
SN2itemB30itemA1qty[0]0itemB2qty[1]0itemC10qty[2]n/an/ashoppingCART532
SN3itemB20itemB10qty[0]0itemC1qty[1]n/an/an/aqty[2]n/an/ashoppingCART448
SN4itemC10itemA2qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART391
SN5itemB30itemA2qty[0]0itemB10qty[1]0itemC1qty[2]n/an/ashoppingCART352
SN6itemB10itemC1qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART324
SN7itemA30itemA2qty[0]0itemB2qty[1]0itemC2qty[2]n/an/ashoppingCART297
SN8itemB0n/an/an/aqty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART277
SN9itemC20itemB1qty[0]0itemC10qty[1]n/an/an/aqty[2]n/an/ashoppingCART261
SN10itemC30itemA10qty[0]0itemB2qty[1]0itemC1qty[2]n/an/ashoppingCART246
SN11itemA20itemB2qty[0]0itemC2qty[1]n/an/an/aqty[2]n/an/ashoppingCART234
SN12itemA30itemA1qty[0]0itemB1qty[1]0itemC1qty[2]n/an/ashoppingCART223
SN13itemA10itemB10qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART213
SN14itemA30itemA10qty[0]0itemB10qty[1]0itemC10qty[2]n/an/ashoppingCART208
SN15itemC30itemA2qty[0]0itemB1qty[1]0itemC10qty[2]n/an/ashoppingCART203
SN16itemCunsetn/an/an/aqty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART199
SN17itemB30itemA10qty[0]0itemB1qty[1]0itemC2qty[2]n/an/ashoppingCART196
SN18itemC30itemA1qty[0]0itemB10qty[1]0itemC2qty[2]n/an/ashoppingCART193
SN19itemC10itemC10qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART191
SN20itemA10itemC2qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART189
SN21itemA20itemA1qty[0]0itemC1qty[1]n/an/an/aqty[2]n/an/ashoppingCART187
SN22itemBunsetn/an/an/aqty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART186
SN23itemA0n/an/an/aqty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART185
SN24itemC0n/an/an/aqty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/ashoppingCART184

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

The items already in the cart are constrained to be different, to appear in separate cart positions. Each value for newQ[i] is constrained to be the same as qty[i] because the exit action of the cart state sets newQ[i] equal to qty[i] before the transition back to nonemptyCart. Each of the newQ[i] factors is one function of one determinant factor because it always equals qty[i] in this partition. In this case the functionally dependent form is equivalent to the fixed values form: Both forms yield test cases covering the same values and pairs.

SN2 is set up by placing itemA, itemB and itemC in the cart from the shopping page. New quantities of 2 for itemB and 10 for itemC are entered, and the update button is clicked. The shop button is clicked to return to the shopping page, and itemB is placed in the cart (again) to trigger the transition to nonemptyCart.

#4. nonemptyCart 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
1 Value3 Values2 Values3 Values3 Values4 Values3 Values3 Values4 Values5 Values3 Values2 Values4 Values5 Values4 Values5 Values1 Value16 Values2291
NN1unset10itemA10n/an/an/an/an/an/an/an/a0n/anonemptyCartCHECK(0)[0<=i&&i<n]2138
NN2unset31itemA1011itemB1000itemC10110nonemptyCartQTY(1,0)[0<=i&&i<n]1988
NN3unset31itemA220itemB221itemC2021nonemptyCartQTY(2,1)[0<=i&&i<n]1856
NN4unset21itemB10101itemC11n/an/an/an/a12nonemptyCartQTY(1,2)[0<=i&&i<n]1732
NN5unset30itemA1101itemB111itemC12010nonemptyCartQTY(0,10)[0<=i&&i<n]1630
NN6unset21itemB110itemC210n/an/an/an/an/an/anonemptyCartUPDATE1545
NN7unset30itemA101itemB2101itemC101022nonemptyCartQTY(2,2)[0<=i&&i<n]1472
NN8unset10itemC22n/an/an/an/an/an/an/an/a00nonemptyCartQTY(0,0)[0<=i&&i<n]1404
NN9unset20itemB1000itemC102n/an/an/an/a01nonemptyCartQTY(0,1)[0<=i&&i<n]1336
NN10unset30itemA100itemB100itemC101n/anonemptyCartCHECK(1)[0<=i&&i<n]1281
NN11unset30itemA221itemB1020itemC21n/an/anonemptyCartUPDATE1231
NN12unset30itemA210itemB2100itemC22110nonemptyCartQTY(1,10)[0<=i&&i<n]1187
NN13unset11itemC1010n/an/an/an/an/an/an/an/a02nonemptyCartQTY(0,2)[0<=i&&i<n]1144
NN14unset30itemA1020itemB1010itemC1010210nonemptyCartQTY(2,10)[0<=i&&i<n]1103
NN15unset31itemA111itemB121itemC11011nonemptyCartQTY(1,1)[0<=i&&i<n]1063
NN16unset31itemA121itemB1101itemC1120nonemptyCartQTY(2,0)[0<=i&&i<n]1026
NN17unset31itemA10101itemB10101itemC1002n/anonemptyCartCHECK(2)[0<=i&&i<n]990
NN18unset21itemB1021itemC100n/an/an/an/a110nonemptyCartQTY(1,10)[0<=i&&i<n]956
NN19unset31itemA2101itemB201itemC21000nonemptyCartQTY(0,0)[0<=i&&i<n]924
NN20unset10itemB101n/an/an/an/an/an/an/an/a010nonemptyCartQTY(0,10)[0<=i&&i<n]896
NN21unset30itemA1100itemB1020itemC2102nonemptyCartQTY(0,2)[0<=i&&i<n]869
NN22unset21itemB201itemC21n/an/an/an/a10nonemptyCartQTY(1,0)[0<=i&&i<n]845
NN23unset31itemA10101itemB210itemC1101nonemptyCartQTY(0,1)[0<=i&&i<n]824
NN24unset31itemA1001itemB1021itemC1020n/anonemptyCartCHECK(0)[0<=i&&i<n]804
NN25unset31itemA211itemB1011itemC1012nonemptyCartQTY(1,2)[0<=i&&i<n]785
NN26unset10itemC1010n/an/an/an/an/an/an/an/an/an/anonemptyCartUPDATE768
NN27unset11itemC11n/an/an/an/an/an/an/an/a01nonemptyCartQTY(0,1)[0<=i&&i<n]752
NN28unset31itemA1021itemB101itemC2222nonemptyCartQTY(2,2)[0<=i&&i<n]736
NN29unset20itemA10100itemC20n/an/an/an/a11nonemptyCartQTY(1,1)[0<=i&&i<n]721
NN30unset21itemB201itemC21n/an/an/an/a1n/anonemptyCartCHECK(1)[0<=i&&i<n]708
NN31unset31itemA201itemB211itemC21210nonemptyCartQTY(2,10)[0<=i&&i<n]695
NN32unset31itemA210itemB100itemC1010n/an/anonemptyCartUPDATE683
NN33unset31itemA220itemB221itemC20010nonemptyCartQTY(0,10)[0<=i&&i<n]672
NN34unset30itemA210itemB2100itemC2220nonemptyCartQTY(2,0)[0<=i&&i<n]661
NN35unset20itemB1000itemC102n/an/an/an/a00nonemptyCartQTY(0,0)[0<=i&&i<n]652
NN36unset21itemB221itemC110n/an/an/an/a02nonemptyCartQTY(0,2)[0<=i&&i<n]643
NN37unset30itemA101itemB2101itemC101021nonemptyCartQTY(2,1)[0<=i&&i<n]634
NN38unset30itemA100itemB100itemC102n/anonemptyCartCHECK(2)[0<=i&&i<n]626
NN39unset21itemB221itemC110n/an/an/an/a0n/anonemptyCartCHECK(0)[0<=i&&i<n]619
NN40unset31itemA1021itemB101itemC2201nonemptyCartQTY(0,1)[0<=i&&i<n]612
NN41unset30itemA100itemB100itemC1010nonemptyCartQTY(1,0)[0<=i&&i<n]605
NN42unset30itemA101itemB2101itemC101012nonemptyCartQTY(1,2)[0<=i&&i<n]598
NN43unset31itemA10101itemB210itemC110n/anonemptyCartCHECK(0)[0<=i&&i<n]592
NN44unset31itemA1001itemB1021itemC1021n/anonemptyCartCHECK(1)[0<=i&&i<n]586
NN45unset31itemA111itemB121itemC110110nonemptyCartQTY(1,10)[0<=i&&i<n]580
NN46unset31itemA1011itemB1000itemC10121nonemptyCartQTY(2,1)[0<=i&&i<n]574
NN47unset31itemA211itemB1011itemC1022nonemptyCartQTY(2,2)[0<=i&&i<n]568
NN48unset31itemA201itemB200itemC12n/an/anonemptyCartUPDATE562
NN49unset31itemA201itemB211itemC212n/anonemptyCartCHECK(2)[0<=i&&i<n]557
NN50unset21itemA1001itemC1010n/an/an/an/a010nonemptyCartQTY(0,10)[0<=i&&i<n]552
NN51unset30itemA100itemB100itemC1000nonemptyCartQTY(0,0)[0<=i&&i<n]547
NN52unset30itemA101itemB2101itemC101002nonemptyCartQTY(0,2)[0<=i&&i<n]542
NN53unset31itemA201itemB211itemC2111nonemptyCartQTY(1,1)[0<=i&&i<n]537
NN54unset30itemA1100itemB1020itemC2112nonemptyCartQTY(1,2)[0<=i&&i<n]532
NN55unset31itemA1001itemB1021itemC10220nonemptyCartQTY(2,0)[0<=i&&i<n]527
NN56unset30itemA1101itemB111itemC1221nonemptyCartQTY(2,1)[0<=i&&i<n]522
NN57unset30itemA1100itemB1020itemC2122nonemptyCartQTY(2,2)[0<=i&&i<n]517
NN58unset30itemA100itemB100itemC10210nonemptyCartQTY(2,10)[0<=i&&i<n]512
NN59unset31itemA211itemB1011itemC1002nonemptyCartQTY(0,2)[0<=i&&i<n]508
NN60unset31itemA1011itemB1000itemC101010nonemptyCartQTY(0,10)[0<=i&&i<n]504
NN61unset31itemA1021itemB101itemC2210nonemptyCartQTY(1,0)[0<=i&&i<n]500
NN62unset30itemA1020itemB1010itemC101011nonemptyCartQTY(1,1)[0<=i&&i<n]496
NN63unset30itemA100itemB100itemC100n/anonemptyCartCHECK(0)[0<=i&&i<n]493
NN64unset30itemA210itemB2100itemC221n/anonemptyCartCHECK(1)[0<=i&&i<n]490
NN65unset31itemA111itemB121itemC1102n/anonemptyCartCHECK(2)[0<=i&&i<n]487
NN66unset10itemC100n/an/an/an/an/an/an/an/a010nonemptyCartQTY(0,10)[0<=i&&i<n]484
NN67unset31itemA1011itemB1000itemC10100nonemptyCartQTY(0,0)[0<=i&&i<n]481
NN68unset30itemA101itemB2101itemC101001nonemptyCartQTY(0,1)[0<=i&&i<n]478
NN69unset31itemA1021itemB101itemC2212nonemptyCartQTY(1,2)[0<=i&&i<n]475
NN70unset31itemA201itemB211itemC21110nonemptyCartQTY(1,10)[0<=i&&i<n]472
NN71unset31itemA10101itemB10101itemC100110nonemptyCartQTY(1,10)[0<=i&&i<n]469
NN72unset31itemA2101itemB201itemC21020nonemptyCartQTY(2,0)[0<=i&&i<n]466
NN73unset30itemA210itemB2100itemC22210nonemptyCartQTY(2,10)[0<=i&&i<n]463
NN74unset11itemC11n/an/an/an/an/an/an/an/a0n/anonemptyCartCHECK(0)[0<=i&&i<n]461
NN75unset31itemA2101itemB201itemC2100n/anonemptyCartCHECK(0)[0<=i&&i<n]459
NN76unset30itemA1020itemB1010itemC10101n/anonemptyCartCHECK(1)[0<=i&&i<n]457
NN77unset30itemA1100itemB1020itemC211n/anonemptyCartCHECK(1)[0<=i&&i<n]455
NN78unset31itemA1021itemB101itemC222n/anonemptyCartCHECK(2)[0<=i&&i<n]453
NN79unset20itemA2100itemC102n/an/an/an/a10nonemptyCartQTY(1,0)[0<=i&&i<n]451
NN80unset21itemB221itemC110n/an/an/an/a11nonemptyCartQTY(1,1)[0<=i&&i<n]449
NN81unset30itemA210itemB2100itemC2200nonemptyCartQTY(0,0)[0<=i&&i<n]447
NN82unset31itemA211itemB1011itemC1001nonemptyCartQTY(0,1)[0<=i&&i<n]445
NN83unset31itemA1021itemB101itemC2202nonemptyCartQTY(0,2)[0<=i&&i<n]443
NN84unset30itemA101itemB2101itemC101010nonemptyCartQTY(1,0)[0<=i&&i<n]441
NN85unset31itemA211itemB1011itemC1020nonemptyCartQTY(2,0)[0<=i&&i<n]439
NN86unset30itemA1100itemB1020itemC21210nonemptyCartQTY(2,10)[0<=i&&i<n]437
NN87unset20itemA100itemC11n/an/an/an/an/an/anonemptyCartUPDATE435
NN88unset21itemB201itemC21n/an/an/an/a00nonemptyCartQTY(0,0)[0<=i&&i<n]434
NN89unset30itemA101itemB2101itemC1010010nonemptyCartQTY(0,10)[0<=i&&i<n]433
NN90unset30itemA100itemB100itemC1011nonemptyCartQTY(1,1)[0<=i&&i<n]432
NN91unset31itemA1001itemB1021itemC10211nonemptyCartQTY(1,1)[0<=i&&i<n]431

The test cases in partition 4 test the CHECK(i), QTY(i,q) and UPDATE transitions from the nonemptyCart state to the nonemptyCart state. Test cases NN6, NN10 and NN18 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. The events CHECK(i) and QTY(i,q) are expressed in terms of the fixed values of i and q by using the fixed values procedure.

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

NN10 is set up by placing itemA, itemB and itemC in the cart from the shopping page. New quantities of 10 for itemA, 2 for itemB and 2 for itemC are entered; the update button is clicked. The delete boxes are checked for itemA, itemB and itemC. New quantities of 10 for itemB and 10 for itemC are entered. The delete box is unchecked for itemB to trigger the transition to nonemptyCart.

NN18 is set up by placing itemB and itemC in the cart from the shopping page. New quantities of 10 for itemB and 10 for itemC are entered, and the update button is clicked. New quantities of 2 for itemB and 0 for itemC are entered. Finally a new quantity of 10 is entered for itemC to trigger the transition to nonemptyCart.

#5. checkout 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
1 Value3 Values1 Value3 Values3 Values1 Value2 Values3 Values4 Values1 Value2 Values2 Values4 Values1 Value1 Value1 Value1 Value1 Value568
CN1unset10itemC10qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/acheckoutCART415
CN2unset30itemA1qty[0]0itemB1qty[1]0itemC1qty[2]n/an/acheckoutCART298
CN3unset20itemB2qty[0]0itemC2qty[1]n/an/an/aqty[2]n/an/acheckoutCART220
CN4unset30itemA10qty[0]0itemB10qty[1]0itemC10qty[2]n/an/acheckoutCART181
CN5unset30itemA2qty[0]0itemB2qty[1]0itemC2qty[2]n/an/acheckoutCART154
CN6unset10itemA1qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/acheckoutCART140
CN7unset20itemB10qty[0]0itemC1qty[1]n/an/an/aqty[2]n/an/acheckoutCART130
CN8unset20itemB1qty[0]0itemC10qty[1]n/an/an/aqty[2]n/an/acheckoutCART120
CN9unset10itemB2qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/acheckoutCART112
CN10unset20itemA1qty[0]0itemC2qty[1]n/an/an/aqty[2]n/an/acheckoutCART109
CN11unset30itemA2qty[0]0itemB10qty[1]0itemC1qty[2]n/an/acheckoutCART106
CN12unset30itemA2qty[0]0itemB1qty[1]0itemC10qty[2]n/an/acheckoutCART103
CN13unset30itemA10qty[0]0itemB2qty[1]0itemC1qty[2]n/an/acheckoutCART100
CN14unset30itemA1qty[0]0itemB2qty[1]0itemC10qty[2]n/an/acheckoutCART98
CN15unset30itemA10qty[0]0itemB1qty[1]0itemC2qty[2]n/an/acheckoutCART96
CN16unset30itemA1qty[0]0itemB10qty[1]0itemC2qty[2]n/an/acheckoutCART94
CN17unset10itemC1qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/acheckoutCART93
CN18unset10itemC2qty[0]n/an/an/aqty[1]n/an/an/aqty[2]n/an/acheckoutCART92

The test cases in partition 5 test the CART transitions from the checkout state to the nonemptyCart state with all allowed pairs of factor values. Test case CN3 is set up as illustrated below.

The items already in the cart are constrained to be different, to appear in separate cart positions. Each value for newQ[i] is constrained to be the same as qty[i] because the exit action of the cart state sets newQ[i] equal to qty[i] before the transition back to nonemptyCart. Each of the newQ[i] factors is one function of one determinant factor because it always equals qty[i] in this partition. In this case the functionally dependent form is equivalent to the fixed values form: Both forms yield test cases covering the same values and pairs.

CN3 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 checkout button is clicked, and then the cart button is clicked to trigger the transition to nonemptyCart.

#6. emptyCart 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 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value1 Value153
ES1unset0n/an/an/an/an/an/an/an/an/an/an/an/an/an/aemptyCartSHOP0

The test case in partition 6 tests the SHOP transition from the emptyCart state to the shopping state with all allowed pairs of factor values.

#7. nonemptyCart 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 Value3 Values2 Values3 Values3 Values4 Values3 Values3 Values4 Values5 Values3 Values2 Values4 Values5 Values1 Value1 Value1 Value1 Value1118
NS1unset10itemA10n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP965
NS2unset31itemA1011itemB1000itemC101n/an/anonemptyCartSHOP827
NS3unset31itemA220itemB221itemC20n/an/anonemptyCartSHOP719
NS4unset21itemB10101itemC11n/an/an/an/an/an/anonemptyCartSHOP620
NS5unset30itemA1101itemB111itemC12n/an/anonemptyCartSHOP555
NS6unset20itemA1010itemC210n/an/an/an/an/an/anonemptyCartSHOP508
NS7unset30itemA101itemB2101itemC1010n/an/anonemptyCartSHOP470
NS8unset10itemC22n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP433
NS9unset20itemB1000itemC102n/an/an/an/an/an/anonemptyCartSHOP405
NS10unset30itemA100itemB100itemC10n/an/anonemptyCartSHOP381
NS11unset11itemC1010n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP363
NS12unset30itemA1100itemB1020itemC21n/an/anonemptyCartSHOP345
NS13unset31itemA211itemB1011itemC10n/an/anonemptyCartSHOP329
NS14unset31itemA1021itemB101itemC22n/an/anonemptyCartSHOP314
NS15unset30itemA1020itemB1010itemC1010n/an/anonemptyCartSHOP300
NS16unset21itemB221itemC110n/an/an/an/an/an/anonemptyCartSHOP288
NS17unset31itemA111itemB121itemC110n/an/anonemptyCartSHOP276
NS18unset10itemB101n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP265
NS19unset31itemA201itemB211itemC21n/an/anonemptyCartSHOP254
NS20unset30itemA210itemB2100itemC22n/an/anonemptyCartSHOP243
NS21unset20itemA10100itemC20n/an/an/an/an/an/anonemptyCartSHOP234
NS22unset31itemA121itemB1101itemC11n/an/anonemptyCartSHOP227
NS23unset31itemA10101itemB10101itemC100n/an/anonemptyCartSHOP220
NS24unset31itemA2101itemB201itemC210n/an/anonemptyCartSHOP214
NS25unset31itemA1001itemB1021itemC102n/an/anonemptyCartSHOP209
NS26unset21itemB110itemC101n/an/an/an/an/an/anonemptyCartSHOP206
NS27unset11itemC11n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP204
NS28unset31itemA2100itemB101itemC100n/an/anonemptyCartSHOP202
NS29unset31itemA10101itemB210itemC11n/an/anonemptyCartSHOP200
NS30unset10itemC100n/an/an/an/an/an/an/an/an/an/anonemptyCartSHOP199
NS31unset21itemB201itemC21n/an/an/an/an/an/anonemptyCartSHOP198
NS32unset21itemB1021itemC100n/an/an/an/an/an/anonemptyCartSHOP197

The test cases in partition 7 test the SHOP transitions from the nonemptyCart state to the shopping state with all allowed pairs of factor values. Test case NS1 is set up as illustrated below.

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

NS1 is set up by placing itemA in the cart from the shopping page. A new quantity 0 is entered for itemA. The shop button is clicked to trigger the transition to shopping.

#8. nonemptyCart 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
NC1unset10itemA10n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT965
NC2unset31itemA1011itemB1000itemC101n/an/anonemptyCartCHECKOUT827
NC3unset31itemA220itemB221itemC20n/an/anonemptyCartCHECKOUT719
NC4unset21itemB10101itemC11n/an/an/an/an/an/anonemptyCartCHECKOUT620
NC5unset30itemA1101itemB111itemC12n/an/anonemptyCartCHECKOUT555
NC6unset20itemA1010itemC210n/an/an/an/an/an/anonemptyCartCHECKOUT508
NC7unset30itemA101itemB2101itemC1010n/an/anonemptyCartCHECKOUT470
NC8unset10itemC22n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT433
NC9unset20itemB1000itemC102n/an/an/an/an/an/anonemptyCartCHECKOUT405
NC10unset30itemA100itemB100itemC10n/an/anonemptyCartCHECKOUT381
NC11unset11itemC1010n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT363
NC12unset30itemA1100itemB1020itemC21n/an/anonemptyCartCHECKOUT345
NC13unset31itemA211itemB1011itemC10n/an/anonemptyCartCHECKOUT329
NC14unset31itemA1021itemB101itemC22n/an/anonemptyCartCHECKOUT314
NC15unset30itemA1020itemB1010itemC1010n/an/anonemptyCartCHECKOUT300
NC16unset21itemB221itemC110n/an/an/an/an/an/anonemptyCartCHECKOUT288
NC17unset31itemA111itemB121itemC110n/an/anonemptyCartCHECKOUT276
NC18unset10itemB101n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT265
NC19unset31itemA201itemB211itemC21n/an/anonemptyCartCHECKOUT254
NC20unset30itemA210itemB2100itemC22n/an/anonemptyCartCHECKOUT243
NC21unset20itemA10100itemC20n/an/an/an/an/an/anonemptyCartCHECKOUT234
NC22unset31itemA121itemB1101itemC11n/an/anonemptyCartCHECKOUT227
NC23unset31itemA10101itemB10101itemC100n/an/anonemptyCartCHECKOUT220
NC24unset31itemA2101itemB201itemC210n/an/anonemptyCartCHECKOUT214
NC25unset31itemA1001itemB1021itemC102n/an/anonemptyCartCHECKOUT209
NC26unset21itemB110itemC101n/an/an/an/an/an/anonemptyCartCHECKOUT206
NC27unset11itemC11n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT204
NC28unset31itemA2100itemB101itemC100n/an/anonemptyCartCHECKOUT202
NC29unset31itemA10101itemB210itemC11n/an/anonemptyCartCHECKOUT200
NC30unset10itemC100n/an/an/an/an/an/an/an/an/an/anonemptyCartCHECKOUT199
NC31unset21itemB201itemC21n/an/an/an/an/an/anonemptyCartCHECKOUT198
NC32unset21itemB1021itemC100n/an/an/an/an/an/anonemptyCartCHECKOUT197

The test cases in partition 8 test the CHECKOUT transitions from the nonemptyCart state to the checkout state with all allowed pairs of factor values. Test case NC4 is set up as illustrated below.

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

NC4 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.