This repository contains the experimental code for the paper:
PSALM: applying Proportional SAmpLing strategy in Metamorphic Testing
The code is research-oriented and intended to support the experiments reported in the paper.
- Implementing PSALM (a proportional sampling strategy) and several baselines (Random, ART, MT-ART).
- Running metamorphic testing experiments on multiple Java and Python subject programs.
- Comparing PSALM with baseline strategies under metamorphic testing.
- Producing experimental results, tables and figures for RQ1–RQ3 in the paper.
-
java/
Java subject programs, metamorphic relations, generators, mutant integration, and experiment drivers. -
python/
Python subject programs with the same experimental structure as the Java side. -
RQ1/,RQ2/,RQ3/
Analysis scripts that aggregate raw results and generate tables/figures for the paper.
-
Java subjects
jackson_project,jfreeChart_project,lang_project,math1_project,math2_project -
Python subjects
geometricSum,incomeTax,mortgageRate
Each subject follows a similar layout:
generation/phase1,generation/phase2– test or MG sampling strategiesmetamorphicRelations/– subject-specific MRsmodel/– test case and MR abstractionsmutants/– externally generated mutantsraw_results/– experiment drivers and JSON outputsmutants_analysis/– optional mutant classification and subsumption analysis
-
Prepare mutants externally
Generate mutants using external tools (mutmutandMajor) and place them into the expected directory structure. -
Run per-subject experiments
Use subject-specific raw result scripts (e.g.,get_raw_results_*.javaorget_raw_results_*.py) to run PSALM and baseline strategies. -
Aggregate results
Run scripts underRQ1/,RQ2/, andRQ3/to compute statistics and generate tables/figures.
- Java experiments: run
java/<subject>/raw_results/get_raw_results_*.java. - Python experiments: run
python/<subject>/raw_results/get_raw_results_*.py. - Mutants must be generated externally before running experiments.
- This is research code meant to accompany the paper.
- Reproducing results requires:
- Reading the paper for experimental settings.
- Preparing mutants in advance.
- Adjusting paths and configurations to your environment.
- Code-level understanding is expected.
- The mutants files are not included in this repository due to their size. Please generate them using the external tools.