STARTS is a tool for static class-level regression test selection tool for Maven-based Java programs.
- Java 1.8 and above
- Maven 3.2.5 and above
- Maven Surefire 2.14 and above
git clone https://github.com/TestingResearchIllinois/starts
cd starts
mvn install
NOTE: Step 3 is required to install the YASGL graph library.
To integrate STARTS Maven plugin into your project, change the pom.xml to achieve the following:
- Add the configuration for STARTS plugin.
- Add an excludesFile tag to Surefire plugin.
Below is a sketch:
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
...
<excludesFile>myExcludes</excludesFile>
</configuration>
</plugin>
...
<plugin>
<groupId>edu.illinois</groupId>
<artifactId>starts-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
</plugins>
</build>
</project>
The line, <excludesFile>myExcludes</excludesFile>
, is only needed if
the pom.xml
file did not already declare an </excludesFile>
, in
which case the excludes file name must be myExcludes
, as shown
above. STARTS requires the <excludesFile>
tag as shown above and
will work even if the myExcludes
file does not already exist on the
filesystem. See the FAQ Section below for more information.
- To see all the goals that STARTS provides, run
mvn starts:help
- To see the details for any of the goals, run
mvn starts:help -Ddetail=true -Dgoal=<goal>
; replace<goal>
with the goal of interest.
-
To see the types that changed since the last time STARTS was run:
mvn starts:diff
-
To see the types that may be impacted by changes since the last time STARTS was run:
mvn starts:impacted
-
To see the tests that are affected by the most recent changes:
mvn starts:select
-
To perform RTS using STARTS (i.e., select tests and run the selected tests):
mvn starts:starts
-
To remove all artifacts that STARTS stores between versions (i.e. in the .starts directories):
mvn starts:clean
NOTE: By default, commands (1) - (3) will not update the
checksums of files in the latest version, while the command in (4)
will update the checksums of the files. Each command has a
update**Checksums
option that can be used to change the default
behavior. For example, to update the checksums while checking the
diff, run mvn starts:diff -DupdateDiffChecksums=true
.
-
I got the following error after integrating STARTS and running
mvn test
:Failed to load list from file: myExcludes
.Solution: Once the
pom.xml
file is modified as described above, it is assumed that the user is only interested to run STARTS goals. Unfortunately, this currently breaks the usualmvn test
invocation which expects the<excludesFile>
to exist on the filesystem. If you must runmvn test
with STARTS integrated with thepom.xml
file, either run STARTS in a Maven profile, or make sure that the filemyExcludes
, which is specified in the Surefire<excludesFile>
tag exists on the filesystem for every Maven module in your project.