DIRTS is a static class- or method-level Regression Test Selection (RTS) research tool that is aware of Dependency Injection (DI) mechanisms.
| Mojo | Description |
|---|---|
class_level_select |
Select tests using the class-level approach |
method_level_select |
Select tests using the method-level approach |
| Mojo | Description |
|---|---|
class_level_graph |
Show graph created by the class-level approach |
method_level_graph |
Show graph created by the method-level approach |
| Mojo | Description |
|---|---|
clean |
Clean up temporary files and directories |
| Option | Description | Default |
|---|---|---|
logging |
Logging level (values in java.util.logging.Level) |
INFO |
useSpringExtension |
Analyze dependencies induced by Spring | false |
useGuiceExtension |
Analyze dependencies induced by Guice | false |
useCDIExtension |
Analyze dependencies induced by CDI | false |
| Option | Description | Default |
|---|---|---|
standalone |
Run in standalone mode - if not present, DIRTS expects that another RTS-tool has already excluded some tests in the excludesFile |
false |
overrideExtension |
In combination with standalone=false, behave like tool is running standalone but only exclude tests affected by DI-related changes |
false |
| Option | Description | Default |
|---|---|---|
toFile |
Store graph representation on the filesystem instead of printing it to stdout | false |
outputFile |
The name of the file, where the graph is stored if toFile is set to true |
[class|method]_level |
DIRTS can be used completely standalone for RTS by specifying standalone=true.
DIRTS can also be used to run after another RTS tool and only correct for tests affected by DI-related changes.
The other tool is required to exclude tests in the file specified by surefire's excludesFile property.
DIRTS needs to run after the other RTS tool and will then comment out those tests that are affected by DI-related
changes,
but have been excluded before.
This is the default behavior of DIRTS.
DIRTS is built to be used with Maven Surefire. The simplest way to use DIRTS in a Maven project is through the DIRTS Maven plugin:
<plugin>
<groupId>edu.tum.sse.dirts</groupId>
<artifactId>dirts-maven-plugin</artifactId>
<version>${dirts.version}</version>
<configuration>
...
</configuration>
</plugin>excludesFile-property needs to be set, ideally for every submodule separately. Otherwise, test exclusion
will not function.useSpringExtension) to true.Even though DIRTS analyzes plain source code, in case of certain inter-module dependencies, it may be required to compile before executing the selection procedure.
$ mvn compile dirts:class_level_select testDIRTS creates a list of these modules in .dirts/affected_modules inside the folder of the outermost module.
$ mvn dirts:class_level_select
$ mvn -am -pl "$(cat .dirts/affected_modules)" test$ mvn dirts:class_level_select$ mvn compile dirts:class_level_select test$ mvn dirts:class_level_select
$ mvn -am -pl "$(cat .dirts/affected_modules)" testTo build DIRTS simply run:
$ mvn clean installThis will build the code for all modules, run all tests, and install the JARs to your local Maven repository.