Source code of our paper: SWFC-ART: A Cost-effective Approach for Fixed-Size-Candidate-Set Adaptive Random Testing through Small World Graphs
Abstract: Adaptive random testing (ART) improves the failure-detection effectiveness of random testing by leveraging properties of the clustering of failure-causing inputs of most faulty programs: ART uses a sampling mechanism that evenly spreads test cases within a software's input domain. The widely-used Fixed-Sized-Candidate-Set ART (FSCS-ART) sampling strategy faces a quadratic time cost, which worsens as the dimensionality of the software input domain increases. In this paper, we propose an approach based on small world graphs that can enhance the computational efficiency of FSCS-ART: SWFC-ART. To efficiently perform nearest neighbor queries for candidate test cases, SWFC-ART incrementally constructs a hierarchical navigable small world graph for previously executed, non-failure-causing test cases. Moreover, SWFC-ART has shown consistency in programs with high dimensional input domains. Our simulation and empirical studies show that SWFC-ART reduces the computational overhead of FSCS-ART from quadratic to log-linear order while maintaining the failure-detection effectiveness of FSCS-ART, and remaining consistent in high dimensional input domains. We recommend using SWFC-ART in practical software testing scenarios, where real-life programs often have high dimensional input domains and low failure rates.
This project is made possible by the:
KDFC-ART: https://github.com/maochy/kdfc-art
HNSW-Java: https://github.com/jelmerk/hnswlib
To reproduce the results, Please refer to: hnswlib-examples => hnswlib-examples-java => src => main => java => com.github.jelmerk.knn.examples => test.model.
Make sure to satisfy all maven dependencies for proper execution of the project.
This is maven project and we recommend to use IntelliJ IDEA for smooth experience.
1.
Facing import error:
Solution:
Set the source directories, i.e., hnswlib-examples > hnswlib-examples-java > src > main > java
and hnswlib-core > src > main > java
by selecting the directory in the Project window, right clicking and selecting Mark Directory As > Sources Root
, as shown in following images: (details)
2.
Cant resolve maven dependencies:
Solution:
Clean old maven dependencies
3. Exception in thread "main" java.io.IOException: The system cannot find the path specified
Solution:
By default, test results are stored in E:/temp/
directory. Please create test
folder in E
drive. OR Specify custom path for storing results here and here
4.
Enable auto import maven plugins in IntellijIDEA.
5.
Make sure your maven imports are correct.
6.
Use latest version of IntelliJ IDEA
If you are still facing problem in project configuration, feel free to open an issue, we shall try our best to resolve it.