Skip to content

Run Mutation Dataset On Tregression

WYK edited this page May 23, 2023 · 1 revision

SPP based on computational cost is now available on Tregression. You can also test the SPP on mutation dataset.

  1. Clone the Microbat and go to branch stepwiseProp:
git clone https://github.com/llmhyy/microbat.git
cd microbat
git checkout stepwiseProp
  1. Clone the Tregression and go to branch stepwiseProp:
git clone https://github.com/llmhyy/tregression.git
cd tregression
git checkout stepwiseProp
  1. It is recommended to test the SPP on mutation dataset. You may get 40 sample of mutated projects here:
git clone https://github.com/ykwongaq/mutation_samples.git

To enable java mutation framework, please copy the folder tregression/java-mutation-framework to %USERPROFILE%\lib\resources

After than, please modify java_home argument to the path to JAVA 8 in %USERPROFILE%\lib\resources\java-mutation-framework\microbatConfig.json file

  1. Set up Tregression following the readme file

  2. Run Tregression as Eclipse Application

  3. Go to Windows -> Preferences -> Tregression(Defecj4j)

image

Set Repository Path to the path that you clone the mutation dataset

Set Project Name to math_70

Check Use Test Case ID, it is because the mutation dataset use id to identify each mutation

Set Test Case ID to the target bug id, eg 1. If you are using the mutation dataset above, you can set id from 1 to 40 as the mutation dataset only contain 40 samples

Note that if you want to debug other project, you need to change the configuration based on the readme file accordingly

  1. After setting up the configuration, click this red cross button to load the mutation projection in Tregression

image

Running SPP

  1. To run SPP, you need to first initialize the Inputs and the Outputs of the test case. Inputs are the input variables of the test case, which assumed to be correct. Outputs are the output variables of the test case, which assumed to be wrong.

To specify which variables are the Inputs, please go to Step Property view, and select the variables that you are sure to be correct, and then click the inputs button.

image

To specify which variables are the Outputs, please go to Step Property view, and select the variables that you are sure to be wrong, and then click the outputs button.

image

You can also click the IO button to check which variables you selected and click clear button to erase all the variables that you select

  1. After selecting the Inputs and Output, you may click the stepwise propagation button to start the SPP process

image

  1. Recommended path will be printed on console, you may follow the action to interact with Tregression util you find the root cause.
Clone this wiki locally