1 Introduction
2 Background and related works
2.1 Test case prioritization
2.2 Nature-inspired algorithms
2.2.1 Ant colony optimization
2.2.2 Particle swarm optimization
2.2.3 Greedy algorithms
2.2.4 Local beam search
2.2.5 Bat algorithm
2.3 Related work
Method | Experimental design | Approach | References |
---|---|---|---|
ACO | Yes | Test suite focused | Singh et al. [34] |
PSO | Yes | Test suite focused | Kaur and Bhatt [39] |
Total + additional strategies | Yes | Test suite focused | Zhang et al. [41] |
Two-optimal (greedy) | Yes | Test suite focused | Li et al. [11] |
Adaptive random | Yes | Test suite focused | Jiang and Chan [23] |
GA | Yes | Test suite focused | Panichella et al. [9] |
BITCP | Yes | Test case focused | Proposed method in the study |
3 Bat-inspired test case prioritization
Name | Description | Cyclomatic complexity | Class coupling | LOC | Number of test cases | Percentage of test cases | Language |
---|---|---|---|---|---|---|---|
Data-structures-csharp | A library for all the data structures in C# | 150 | 29 | 507 | 110 | 5 | C# |
Epicycle.math | Epicycle .NET math library | 2450 | 238 | 4443 | 890 | 14 | C# |
GlmSharp | Math library for small vectors and matrices | 3100 | 350 | 5400 | 910 | 22 | C# |
ProjectEuler | Functions solving euler equations | 54 | 29 | 250 | 20 | 4 | C# |
YAMP | Math parser | 5355 | 366 | 12,097 | 2400 | 55 | C# |
4 Case study
4.1 Data sets
4.2 Experimental environment
4.3 Results
ANOVA | SS | DF | MS |
F
|
P value |
---|---|---|---|---|---|
Treatment (between columns) | 10.03 | 4 | 2.508 |
F(4, 258) = 1319 |
\(P < 0.0001\)
|
Residual (within columns) | 0.4905 | 258 | 0.001901 | ||
Total | 10.52 | 262 |
Greedy-ACO | Greedy-PSO | Greedy-LBS | Greedy-BITCP | ACO-PSO | ACO-LBS |
---|---|---|---|---|---|
0.2 (small) | 0.92 (large) | 0.8 (large) |
\(-\)1 (large) | 0.1733333 (small) | 0.7 (large) |
ACO-BITCP | PSO-LBS | LBS-BITCP | PSO-BITCP | ||
---|---|---|---|---|---|
\(-\)1 (large) | 0.7 (large) | 0.5 (medium) | 1 (large) |