## 5 Empirical Studies: Industrial Cases
### Power-Window Switch Module  
Test cases were generated from a UML model for the power-window switch (PWS) module; iterative test execution was optimized via prioritization of the test suite. The module has several submodules controlling door open/closed status, door locking/unlocking, and side mirror control from the driver and passenger seats. The module is connected to the body controller area network (CAN) and receives input from other modules (via the CAN interface) to operate the power-window controls or side-mirror actuators. The module studied is UML-based and is implemented in the Kia Sportage using Rhapsody. The model was loaded into a test case generation program via XMI transformation, and mutants were generated in model state charts using the mutation operators of Section 3.2. The results were compared after 100 test suite prioritizations by each algorithm in the test suite generated to kill 100 mutants. The PWS module featured seven principal submodules in Table 4 and 86 state machines. The test cases generated were proportional to the numbers of mutants, and test cases exhibiting various paths were generated within the state chart even if the module size was small. Thus, similar numbers of test cases were generated for the heater and other more complex functions; the heater submodule is very small. APFD served to measure the fitness of TCP; the outcomes of various prioritization methods were compared. We first confirmed that the data were normally distributed. For each TCP method, the mutation operator created 100 mutants and test cases were then generated automatically. The results (100 for each method) were analyzed as described in Table 5. We confirmed that the APFD values became essentially normally distributed as the test numbers rose; we used ANOVA to explore the statistical significances of APFD differences. We also employed the Duncan post-hoc test; the \(p\)-value was \(<\)0.005 and was correlated among the groups. When the Scheffe test (which is stricter than the Duncan test) was applied, the results of the Random, StTotal, StAddtl, and FeptTotal methods differed significantly. However, the StTotal and StAddtl, and FeptAddtl and AVM methods sometimes did not differ significantly (depending on the submodule). A boxplot of the average APFD comparisons follows. As shown in Figure 4, the TCPs of the seven submodules for the PWS module did not differ significantly. First, test coverage prioritization focusing on statement coverage exhibited relatively low \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Module** & **Number of States** & **Number of Transitions** & **Number of State Machines** & **Number of Test Cases** & \(p\)**-Value** \\ \hline Courtesy Lamp & 12 & 26 & 4 & 1135 & \(<\)0.005 \\ OS Mirror & 109 & 349 & 32 & 1702 & \(<\)0.005 \\ Power window & 78 & 126 & 26 & 1780 & \(<\)0.005 \\ Puddle lamp & 14 & 26 & 5 & 887 & \(<\)0.005 \\ Interface & 26 & 39 & 13 & 1719 & \(<\)0.005 \\ Heater & 4 & 6 & 2 & 1294 & \(<\)0.005 \\ IMS & 27 & 38 & 4 & 1295 & \(<\)0.005 \\ \hline Total & 270 & 610 & 86 & 9812 & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Major functionalities of the power-window switch module. APFDs, as did code-based prioritization, probably reflecting the low correlation between coverage and fault discovery. For the random method, APFD revealed an improved prioritization method based on statement coverage given the iterative operation of \(O(n)\), but the APFD remained lower than those of methods based on fault-exposure probability. Compared to the FepAddtl or AVM, the other methods are not locally optimized, delivering locally convergent results. The fault-exposure probability methods exhibited higher APFDs. Of these, FepAddtl uses a greedy algorithm, yielding better results than FepTotal because the algorithm prioritizes the direction in which fault exposure probability maximally improves. The AVM (our preferred choice) was not very different from FepAddtl; the significance levels were within 0.05 percent (depending on the submodule) but AVM was faster.