| Literature DB >> 35746156 |
Anu Bajaj1, Ajith Abraham1, Saroj Ratnoo2, Lubna Abdelkareim Gabralla3.
Abstract
The emerging areas of IoT and sensor networks bring lots of software applications on a daily basis. To keep up with the ever-changing expectations of clients and the competitive market, the software must be updated. The changes may cause unintended consequences, necessitating retesting, i.e., regression testing, before being released. The efficiency and efficacy of regression testing techniques can be improved with the use of optimization approaches. This paper proposes an improved quantum-behaved particle swarm optimization approach for regression testing. The algorithm is improved by employing a fix-up mechanism to perform perturbation for the combinatorial TCP problem. Second, the dynamic contraction-expansion coefficient is used to accelerate the convergence. It is followed by an adaptive test case selection strategy to choose the modification-revealing test cases. Finally, the superfluous test cases are removed. Furthermore, the algorithm's robustness is analyzed for fault as well as statement coverage. The empirical results reveal that the proposed algorithm performs better than the Genetic Algorithm, Bat Algorithm, Grey Wolf Optimization, Particle Swarm Optimization and its variants for prioritizing test cases. The findings show that inclusivity, test selection percentage and cost reduction percentages are higher in the case of fault coverage compared to statement coverage but at the cost of high fault detection loss (approx. 7%) at the test case reduction stage.Entities:
Keywords: QPSO; nature-inspired algorithms; particle swarm optimization; regression testing; test case prioritization; test case reduction; test case selection
Mesh:
Year: 2022 PMID: 35746156 PMCID: PMC9227216 DOI: 10.3390/s22124374
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.847
Summary of PSO Algorithms used in Regression Testing.
| Author(s) (Year) | Method | Nature-Inspired Approaches | Criteria |
|---|---|---|---|
| De Souza et al., 2013, 2014 | TCS | Binary PSO | Requirement Coverage with Time |
| De Souza et al., 2015 | TCS | Binary PSO-HS | Branch Requirement Coverage with Cost |
| Khatibsyarbini et al., 2018 | TCP | PSO | String Distances |
| Agrawal and Kaur 2018 | TCS | PSO | Fault Coverage and Time |
| Correia, 2019 | TCS | PSO-LS | Requirement Coverage |
| Nayak and Ray 2019 | TCP | PSO | Modified Condition Decision Coverage |
| Samad et al., 2021 | TCP | MOPSO | Code and Fault Coverage with Cost |
| Bajaj and Abraham, 2021 | TCP and TCR | DAPSO | Fault Coverage |
| Bajaj and Sangwan, 2021 | TCP, TCS, TCR | PSOGSA | Statement Coverage |
| Bharathi, 2022 | TCR | PSO-FFA | Fault Coverage |
| Deneke et al., 2022 | TCR | PSO | Requirement Coverage and cost |
Subject Programs.
| Programs | Versions | KLOC | Classes | Methods | Test Cases | Type |
|---|---|---|---|---|---|---|
| ant | 7 | 80.4 | 650 | 7524 | 878 | JUnit |
| jmeter | 5 | 43.4 | 389 | 3613 | 97 | JUnit |
| jtopas | 4 | 5.4 | 50 | 748 | 209 | JUnit |
Parameter settings of the algorithms.
| Algorithms | Parameter Values |
|---|---|
| GA | |
| BA | |
| PSO, AdPSO | |
| QPSO | |
| IQPSO | |
| PSOGSA | |
| DAPSO | |
|
| |
| Common Parameters |
Comparisons of the algorithms for TCP over fault and statement coverages.
| Programs | Algorithms | Mean Fitness, Variance and Tukey Ranking for TCP (%) | |||||
|---|---|---|---|---|---|---|---|
| APFD | Variance | TR | APSC | Variance | TR | ||
| jtopas | IQPSO | 96.702 | 0.879 | A | 98.559 | 0.494 | A |
| PSOGSA | 95.965 | 1.413 | AB | 98.229 | 0.842 | AB | |
| QPSO | 95.621 | 1.966 | B | 97.998 | 0.806 | BC | |
| DAPSO | 94.066 | 3.884 | C | 97.841 | 0.976 | BCD | |
| AdPSO | 93.93 | 4.576 | CD | 97.795 | 0.817 | BCD | |
| GWO | 93.118 | 4.299 | D | 97.706 | 1.895 | DE | |
| GA | 91.918 | 4.555 | E | 97.463 | 1.809 | DE | |
| PSO | 91.18 | 9.875 | E | 97.33 | 1.905 | EF | |
| BAT | 89.951 | 9.152 | F | 96.863 | 4.034 | F | |
| ant | IQPSO | 95.337 | 7.283 | A | 98.105 | 0.976 | A |
| PSOGSA | 94.344 | 10.394 | AB | 97.482 | 2.135 | B | |
| QPSO | 93.937 | 9.935 | B | 97.403 | 2.241 | B | |
| DAPSO | 93.292 | 14.327 | BC | 97.397 | 2.49 | B | |
| AdPSO | 92.53 | 15.674 | C | 97.239 | 2.85 | B | |
| GWO | 92.149 | 15.204 | CD | 96.586 | 4.991 | C | |
| GA | 91.304 | 17.977 | DE | 96.657 | 4.476 | C | |
| PSO | 90.577 | 19.975 | EF | 96.529 | 4.591 | C | |
| BAT | 90.094 | 20.42 | F | 95.924 | 6.397 | D | |
| jmeter | IQPSO | 95.402 | 3.498 | A | 99.218 | 0.193 | A |
| PSOGSA | 94.31 | 5.603 | B | 98.989 | 0.351 | AB | |
| QPSO | 93.696 | 6.492 | B | 98.987 | 0.358 | AB | |
| DAPSO | 92.137 | 10.134 | C | 98.916 | 0.359 | B | |
| AdPSO | 92.12 | 9.617 | C | 98.819 | 0.592 | BC | |
| GWO | 91.943 | 8.38 | C | 98.625 | 0.677 | C | |
| GA | 90.672 | 8.894 | D | 98.331 | 0.747 | D | |
| PSO | 89.396 | 10.309 | E | 98.22 | 0.703 | D | |
| BAT | 89.145 | 12.483 | E | 97.748 | 1.914 | E | |
Figure 1Convergence curves of algorithms for fault and statement coverage criteria of TCP.
Figure 2Boxplots of algorithms for fault and statement coverages of TCP.
Comparisons of the algorithms for TCS over fault and statement coverages.
| Program Versions | Algorithms | TSP | Inclusivity | CRP | |||
|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
| ||
| jtopas | IQPSO | 81.235 |
|
| 87.834 | 17.356 |
|
| PSOGSA | 81.567 | 53.567 | 88.457 | 86.238 | 18.986 | 48.001 | |
| QPSO | 83.485 | 51.833 | 87.422 | 81.034 | 19.084 | 48.767 | |
| DAPSO |
| 59 | 87.644 | 84.387 |
| 41.83 | |
| AdPSO | 80.518 | 61.5 | 85.087 |
| 19.711 | 29.359 | |
| GWO | 74.035 | 64.75 | 82.39 | 75.67 | 26.125 | 34.918 | |
| GA | 77.926 | 77.867 | 84.263 | 85.544 | 21.829 | 23.966 | |
| PSO | 71.593 | 65.5 | 86.672 | 89.792 | 26.897 | 34.695 | |
| BAT | 83.368 | 73.858 | 81.536 | 90.424 | 17.451 | 32.993 | |
| ant | IQPSO |
| 59.667 |
| 79.509 |
| 31.527 |
| PSOGSA | 86.468 | 62.879 | 79.298 | 80.687 | 12.686 | 30.878 | |
| QPSO | 88.81 | 67.622 | 79.5 | 89.621 | 10.016 | 40.798 | |
| DAPSO | 87.995 |
| 79.423 | 85.064 | 11.378 |
| |
| AdPSO | 90.905 | 77 | 78.363 |
| 8.487 | 22.966 | |
| GWO | 90.057 | 72.533 | 78.506 | 88.889 | 8.961 | 27.57 | |
| GA | 89.914 | 72.944 | 77.68 | 93.953 | 9.054 | 28.057 | |
| PSO | 91.014 | 63.889 | 79.752 | 94.038 | 7.887 | 36.914 | |
| BAT | 89.676 | 79.333 | 78.583 | 94.915 | 9.259 | 20.893 | |
| jmeter | IQPSO | 86.483 | 62.4 |
| 78.305 | 12.518 | 35.895 |
| PSOGSA | 88.567 | 63.588 | 95.876 | 77.365 | 11.568 | 34.757 | |
| QPSO | 91.476 | 66.15 | 94.828 | 84.463 | 6.934 | 31.637 | |
| DAPSO |
|
| 94.149 | 83.014 |
|
| |
| AdPSO | 90.843 | 71.89 | 96.02 |
| 7.656 | 26.219 | |
| GWO | 82.903 | 74.19 | 91.695 | 87.447 | 15.025 | 23.725 | |
| GA | 82.363 | 77.51 | 91.557 | 95.509 | 15.251 | 21.195 | |
| PSO | 84.343 | 69.64 | 94.413 | 88.404 | 14.75 | 27.25 | |
| BAT | 86.223 | 78.37 | 93.147 | 92.617 | 12.894 | 18.783 | |
The best results are highlighted with bold.
Comparisons of the algorithms for TSR over fault and statement coverages.
| Program Versions | Algorithms | TSP | FDLP | CRP | |||
|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
| ||
| jtopas | IQPSO |
|
| 0.974 | 1.707 |
|
|
| PSOGSA | 22.138 | 19.711 | 0.902 | 1.909 | 77.656 | 81.876 | |
| QPSO | 22.341 | 19.717 | 0.905 | 2.302 | 77.85 | 81.253 | |
| DAPSO | 22.626 | 19.742 |
| 1.372 | 77.576 | 81.333 | |
| AdPSO | 23.593 | 23.45 | 0.974 |
| 76.44 | 76.45 | |
| GWO | 22.426 | 20.583 | 0.905 | 1.949 | 77.71 | 80.775 | |
| GA | 23.718 | 21.783 | 1.112 |
| 76.569 | 78.67 | |
| PSO | 22.626 | 21.842 | 0.835 | 1.064 | 77.505 | 79.164 | |
| BAT | 24.518 | 24.642 | 0.399 | 0.764 | 75.446 | 75.894 | |
| ant | IQPSO |
|
|
| 8.134 |
|
|
| PSOGSA | 31.755 | 28.234 | 0.412 | 6.689 | 68.587 | 73 | |
| QPSO | 31.425 | 27.933 | 0.434 | 5.975 | 67.295 | 72.07 | |
| DAPSO | 31.283 | 29 | 0.337 |
| 67.288 | 71.014 | |
| AdPSO | 32.278 | 30 |
| 3.998 | 66.886 | 70.209 | |
| GWO | 33.267 | 29.667 | 0.89 | 5.888 | 65.408 | 70.127 | |
| GA | 33.891 | 27.780 | 0.359 | 7.982 | 65.028 | 73.513 | |
| PSO | 32.61 | 28.333 | 1.121 | 4.572 | 65.855 | 72.17 | |
| BAT | 35.291 | 30.333 | 0.446 | 3.696 | 64.574 | 70.274 | |
| jmeter | IQPSO |
|
|
| 1.387 |
|
|
| PSOGSA | 22 | 19.354 |
| 1.076 | 76.453 | 80.653 | |
| QPSO | 22.272 | 19.94 |
| 0.752 | 76.541 | 79.73 | |
| DAPSO | 22.003 | 20 |
| 2.331 | 76.535 | 78.874 | |
| AdPSO | 23.088 | 21.2 |
|
| 75.643 | 77.755 | |
| GWO | 22.834 | 22.4 |
| 0.321 | 76.349 | 77.455 | |
| GA | 22.684 | 21.47 |
|
| 76.193 | 78.171 | |
| PSO | 22.044 | 21.4 |
| 0.752 | 76.859 | 77.102 | |
| BAT | 23.75 | 23.16 |
| 0.357 | 74.837 | 77.237 | |
The best results are highlighted with bold.