-
Notifications
You must be signed in to change notification settings - Fork 7
Mutation on Tregression
WYK edited this page Oct 19, 2022
·
2 revisions
Tregression now are able to mutate a originally correct trace into buggy trace that fail on targeted test case
To perform the mutation functionality, please follow the steps: 9
-
There are several setting that you need to change. In the toolbar, go to
Window -> Preference -> Tregression (defect4j)
-
Repository Path: It is the absolute path to the testing project. The recommanded testing project are installed within
java-mutation-framework/sample
. In this example, we are usingmath_70
as our testing project:C:\Users\user_name\git\java-mutation-framework\sample
-
Project Name: It is the name of the project. In this example, we are using
math_70
-
Test Case: It represent which test case that is being tested. It follow the format
<Test Class Name>#<Test Case Method Name>
. Note that the<Test Class Name>
should contain the package as well. In the example in the above image, the target test case class isorg.apache.commons.math.analysis.BinaryFunctionTest
and the target test case method name istestAdd
Note that other than the test case name, you can also specify the target test case by ID:
- Ues Test Case ID: Check this boxes when you want to select the target test case by ID
-
Test Case ID: The ID of target test case
Note that
Test Case ID
mean the ith test case of the project. From the above example, theTest Caes ID
is 0 and thus we are using the 1st test case in math_70 project.
-
Repository Path: It is the absolute path to the testing project. The recommanded testing project are installed within
-
It is assumed that Microbat is installed. In the toolbar, go to Window -> Preference -> Microbat Debugging. Set up the following parameters:
-
Java Home Path: Absolute path to
JAVA 8
- Step Limit: Reasonable step limit. 300000 is recommended.
-
Java Home Path: Absolute path to
-
Click the
Read Cross
button. It will perform the mutation. -
The order of the mutated node will be printed on the console.