"# TestPrioritization on Class Level" Steps by steps how to use the tool. Sample run on project common-dbutils:
- Download the project common-dbutils: https://drive.google.com/file/d/0B2CUmN6iobxCNG5qcWZPSmV0NkU/view?usp=sharing Download and unzip the TestPrioritization Run mvn install to create a jar file. Record the location to the jar file
- Create a pomTest.xml file. Add the following lines to the Surefire plugin section:
-
Create pomBug.xml file. Same as pomTest.xml but delete the ArgLine section
-
Create some random bugs. Here, we modified org.apache.commons.dbutils.BeanProcessor on line 59 protected static final int PROPERTY_NOT_FOUND = -1; to protected static final int PROPERTY_NOT_FOUND = 1;
-
mvn test -f pomBug.xml To run the test in default order with recorded time for bug
-
Fix the bug. Then run: mvn test -f pomTest.xml To collect the coverage statements of tests and rank them based on total and additional strategies
-
Re-create the bug
-
mvn -Dtest=TestTotal test -f pomBug.xml To run the test set in order sorted by Total strategy, and record time to discover bugs
-
mvn -Dtest=TestAdditional test -f pomBug.xml To run the test set in order sorted by Total strategy, and record time to discover bugs