# Maximizing Test Coverage for Security Threats Using Optimal Test Data Generation
## 4 Experiment Design
Multiple solutions are required corresponding to a constraint to generate test data according to the MC/DC criterion. For example, consider a constraint as an expression C = p \(\vee\) q, where p and q are the clauses of the constraint. There are four combinations of possible outcomes, two each for p and q (TT, TF, FF, and FT). **Step 7.1:** Generating test data for MC/DC  
The idea of the MC/DC is to select the subset of all possible combinations that directly impact the outcome value of the actual constraint. In the case of C, these combinations are (FF, TF, and FT). To identify this subset, the first step is to reformulate the original constraint to obtain more constraints that satisfy the MC/DC criterion. The pair table suggested in [34] provides several potential pairs for each clause, and we need to select minimum subsets of pairs that cover all clauses. In our table, potential pairs are (8,16) from A, (12,16) from B, (14,16) from C, and (15,26) from D. For A, we need to test only conditions of (8,16); for B, we need to test only (12,16). For C, we need to test only (14,16); for D, we must only test (15,16). So, we need to test 5 constraints (8, 12, 14, 15, 16) as specified in Table 5. \begin{table}
\begin{tabular}{c c c c c c} \hline
**No.** & **a** & **b** & **c** & **d** & **((a \(\wedge\) b) \(\wedge\) (c \(\wedge\) d))** \\ \hline
1 & F & F & F & F & F \\ \hline
2 & F & F & F & T & F \\ \hline
3 & F & F & T & F & F \\ \hline
4 & F & F & T & T & F \\ \hline
5 & F & T & F & F & F \\ \hline
6 & F & T & F & T & F \\ \hline
7 & F & T & T & F & F \\ \hline
8 & F & T & T & T & F \\ \hline
9 & T & F & F & F & F \\ \hline
10 & T & F & F & T & F \\ \hline
11 & T & F & T & F & F \\ \hline
12 & T & F & T & T & F \\ \hline
13 & T & T & F & F & F \\ \hline
14 & T & T & F & T & F \\ \hline
15 & T & T & T & F & F \\ \hline
16 & T & T & T & T & T \\ \hline \end{tabular}
\end{table} 
Table 4: Transformation of Boolean Expression into truth table form. **Step 7.2:** Generating test data for D/C  
Decision coverage requires test cases to cover both branches of a decision. For each decision, the D/C criterion requires two test cases. For example, for a decision, the Boolean expression requires two test cases, e.g., the test cases (A = true, A = False) [33]. We have 16 test combinations for decision coverage because we must have to test whether each combination is false or true for each condition, as mentioned in [33]. **Step 8:** Compare and Find Optimal Test Data  
In the above example, we have 16 test conditions; for decision coverage, we need to test all 16 test conditions to achieve maximum coverage for MC/DC. Therefore, it is required to test only 5 test conditions, which comprise the actual test conditions in terms of finding maximum errors. For MC/DC, optimal test conditions were found, and for decision coverage, it is required to test all conditions. So our hypothesis 2 'MC/DC maximizes test coverage for security threats in the Structured Misuse case description' is true and hypothesis 1 will be negated in the results of this experiment. In step 8, we find that test data generated for MC/DC requires fewer test combinations as compared to decision coverage. Therefore, in the test case design, we will use test combinations identified for MC/DC.