PriorCadTest
This is online support of the prioritizing test cases approach PriorCadTest. This page includes tools used by our approach and a dataset which produced by seeding defects, extracting features and collecting test coverage in the example project ArtOfIllusion.
Tools
To investigate the ranking of test cases in CAD software, we select the most widely-used open-source CAD software, Project ArtOfIllusion.
The tools uses by our approach include Spoon, CodeZhi, and JaCoCo.
- Spoon: Spoon is an open-source library to analyze, rewrite, transform, transpile Java source code. In our approach, we use Spoon to mutate Java programs. The purpose of program mutation is to obtain a program with seeded defects.
- CodeZhi: CodeZhi is a tool of feature extraction for Java methods. In our approach, we use CodeZhi to extract features for the methods and test cases under test.
- JaCoCo: JaCoCo is a free code coverage library for Java. We use JaCoCo to collect test coverage and to filter out invalid mutants.
Dataset
Here is the dataset generated during each phase in our approach, and the structure of the dataset can be found as follows.
The dataset includes five directories:
- coverage
- coverage.xls: A coverage matrix generated by JaCoCo. The abscissa of the matrix represents the test cases, and the ordinate of the matrix represents the test cases. A value of 1 in the matrix indicates that the corresponding test case covers the correponding method.
- mutate
- mutate.txt: It is a list of mutate method names.
- vector
- vector.txt: It is a list of method vectors generated by CodeZhi.
- input
- The four directories (animation, math, object and procedural) correspond to the test module names.
- The files in the above four directories are the input vectors of the training model.
- result
- The four directories (animation, math, object and procedural) correspond to the test module names.
- The five directories (decisiontree, MultinomialNB, random, random_forest and svm) in each subdirectory correspond to the five sorting algorithms we take.
- The files in the above five directories are the test result of the training model.
Dataset
├─coverage
│ coverage.xls
│
├─input
│ ├─animation
│ │ testVector.csv
│ │ trainVector.csv
│ │
│ ├─math
│ │ testVector.csv
│ │ trainVector.csv
│ │
│ ├─object
│ │ testVector.csv
│ │ trainVector.csv
│ │
│ └─procedural
│ testVector.csv
│ trainVector.csv
│
├─mutate
│ mutate.txt
│
├─result
│ ├─animation
│ │ ├─decisiontree
│ │ │ prob_matrix.csv
│ │ │ sorted_test_cases.txt
│ │ │ sorted_test_cases_new.txt
│ │ │ test_label1.txt
│ │ │ test_probability1.txt
│ │ │
│ │ ├─MultinomialNB
│ │ │ prob_matrix.csv
│ │ │ sorted_test_cases.txt
│ │ │ sorted_test_cases_new.txt
│ │ │ test_label1.txt
│ │ │ test_probability1.txt
│ │ │
│ │ ├─random
│ │ │ sorted_test_cases_new.txt
│ │ │
│ │ ├─random_forest
│ │ │ prob_matrix.csv
│ │ │ sorted_test_cases.txt
│ │ │ sorted_test_cases_new.txt
│ │ │ test_label1.txt
│ │ │ test_probability1.txt
│ │ │
│ │ └─svm
│ │ prob_matrix.csv
│ │ sorted_test_cases.txt
│ │ sorted_test_cases_new.txt
│ │ test_label1.txt
│ │ test_probability1.txt
│ │
│ ├─math
│ │ same as above...
│ │
│ ├─object
│ │ same as above...
│ │
│ └─procedural
│ same as above...
│
└─vector
vector.txt