-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: last command is the test execution * test: ignore the test of Context2Name since it seems to not work properly * doc: split the documentation and create a dedicated README for the maven plugin
- Loading branch information
Showing
4 changed files
with
57 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# DSpot-Maven | ||
|
||
You can use this plugin on the command line as the jar: | ||
|
||
```bash | ||
# this amplifies the Junit tests to kill more mutants | ||
mvn eu.stamp-project:dspot-maven:amplify-unit-tests | ||
|
||
# this amplifies the Junit tests to improve coverage | ||
mvn eu.stamp-project:dspot-maven:amplify-unit-tests -Dtest-criterion=JacocoCoverageSelector | ||
|
||
``` | ||
|
||
All the option can be pass through command line by prefixing the option with `-D`. | ||
For example: | ||
|
||
```bash | ||
mvn eu.stamp-project:dspot-maven:amplify-unit-tests -Dpath-to-properties=dspot.properties -Dtest=my.package.TestClass -Dcases=testMethod | ||
``` | ||
|
||
or, you can add the following to your `pom.xml`, in the plugins section of the build: | ||
|
||
```xml | ||
<plugin> | ||
<groupId>eu.stamp-project</groupId> | ||
<artifactId>dspot-maven</artifactId> | ||
<version>LATEST</version> | ||
<configuration> | ||
<!-- your configuration --> | ||
</configuration> | ||
</plugin> | ||
``` | ||
Replace `LATEST` with the latest DSpot version number available at Maven central: `2.0.0` | ||
|
||
In case your project is a multi-module, we advise you to configure DSpot in the highest `pom.xml` and use the dedicated property `targetModule` to name the module you want to amplify | ||
|
||
After setting up your `pom.xml` and add your configuration with different options,run: | ||
|
||
```bash | ||
mvn dspot:amplify-unit-tests | ||
``` | ||
|
||
# Advantages | ||
|
||
The advantages of using the maven plugin is that maven will automatically the latest version deployed on maven central, even the SNAPSHOT built at each commits on the master! | ||
|
||
Second, is that the properties is optional and the maven-plugin to automatically infer from the pom.xml some required information such as the path of the project root directory. | ||
|
||
**!! WARNING !!** Since DSpot can be executed on one module at the time, we advise you to the same with the maven plugin by using the dedicated command line option `-DtargetModule=<module>`. | ||
|
||
The best way is to execute dspot-maven on the parent project and specifying the targeted module using the options mentioned above. In this way, DSpot will be able to collect all the dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters