Pairwise Combination Strategy And Constraints Strategy

1357 Words 6 Pages
One of the objectives of this research is to develop a tool in Java programming language. Following the stated objective, CBPTT was developed in Java language and integrated using the NetBeans IDE 8.0.2 software. In order to show how pairwise combination strategy and constraints strategy was implemented in CBPTT let consider the example illustrated in Table 1.1. There are three parameters with quantity of 2, 3 and 3. These parameters are input as string which is presented as {2,3,3}. From this input, CBPTT split based on commas. This resulted in p which started from 0 to increment based on the split value. Then, p became the quantity of parameter which is 3. Parameter value was retrieved when information was converted in integer. Table …show more content…
Since CBPTT only accept integer, comma and x as constraint input. This input was converted to get the constraints information. Based on pizza ordering system, there were three constraints which is vegetarian cheese with roasted chicken, vegetarian cheese with ground beef and meat lover and mushroom. To convert this input into constraint input format, the index of each value must be known. Table 3.6 shows the index of each parameter value of pizza ordering system.

Table 3.6 System index information
System Configurations Pizza Options (parameters) Pizza Type (0) Index Toppings (1) Index Size (2) Index Vegetarian Cheese 0 Roasted Chicken 0 Large 0 Meat Lover 1 Ground Beef 1 Medium 1 Mushroom (Mu) 2 Small 2

Now, based on parameter value index, these constraints was input as {0:0:x, 0:1:x,1:2:x} where ‘x’ is ‘do not care’ value. That means, ‘x’ represent every possible value for the parameter. CBPTT split this input to achieve result as
First constraint: 0:0:x
Second constraint: 0:1:x
Third constraint: 1:2:x Then, these constraints were divided by colon. After that, each value was combined in pair based on parameter pair to produce result as shown in Table 3.7.

Table 3.7 Combined constraints list
Parameter combination First constraint {0:0:x} Second constraint {0:1:x} Third constraint {1:2:x}
[0:1] 0:0 0:1
…show more content…
Each value of parameter was randomized to be combined as test cases. Since it is randomized, no fixed test cases can be got from this process. For instance, pizza ordering system can produced 11 random test case of {{1:1:2}, {0:1:0}, {1:0:0}, {0:1:2}, {0:2:1}, {1:0:1}, {0:1:1}, {1:0:2}, {1:2:1}, {1:2:0}, {1:2:2}}. From these random test case lists, each test case was divided and paired. Result of all random test case paired was shown in Table 3.9.
Table 3.9 Divided test case
Random test case Divided test case
1:1:2 [1:1]
[1:2]
[1:2]
0:1:0 [0:1]
[0:0]
[1:0]
1:0:0 [1:0]
[1:0]
[0:0]
0:1:2 [0:1]
[0:2]
[1:2]
0:2:1 [0:2]
[0:1]
[2:1]
1:0:1 [1:0]
[1:1]
[0:1]
0:1:1 [0:1]
[0:1]
[1:1]
1:0:2 [1:0]
[1:2]
[0:2]
1:2:1 [1:2]
[1:1]
[2:1]
1:2:0 [1:2]
[1:0]
[2:0]
1:2:2 [1:2]
[1:2]

Related Documents