Inital commit
This commit is contained in:
commit
739446ce63
56 changed files with 3401 additions and 0 deletions
47
README.md
Executable file
47
README.md
Executable file
|
@ -0,0 +1,47 @@
|
|||
# [PIT Mutation Testing](https://pitest.org/) Extension for [b<span style="color:orange">l</span>d](https://rife2.com/bldb)
|
||||
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||
[](https://rife2.com/bld)
|
||||
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-pitest)
|
||||
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-pitest)
|
||||
[](https://github.com/rife2/bld-pitest/actions/workflows/bld.yml)
|
||||
|
||||
To install, please refer to the [extensions documentation](https://github.com/rife2/bld/wiki/Extensions).
|
||||
|
||||
To run mutation tests and coverage, add the following to your build file:
|
||||
|
||||
```java
|
||||
@BuildCommand(summary = "Run PIT mutation tests")
|
||||
public void pit() throws Exception {
|
||||
new PitestOperation()
|
||||
.fromProject(this)
|
||||
.reportDir(Path.of("reports", "mutations").toString())
|
||||
.targetClasses(pkg + ".*")
|
||||
.targetTests(pkg + ".*")
|
||||
.verbose(true)
|
||||
.execute();
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
./bld compile pit
|
||||
|
||||
```
|
||||
|
||||
- [View Examples](https://github.com/rife2/bld-pittest/blob/master/examples/src/bld/java/com/example/)
|
||||
|
||||
Please check the [PitestOperation documentation](https://rife2.github.io/bld-pitest/rife/bld/extension/PitestOperation.html#method-summary) for all available configuration options.
|
||||
|
||||
### Pitest (PIT) Dependency
|
||||
|
||||
Don't forget to add the Pitest `test` dependencies to your build file, as they are not provided by the extension. For example:
|
||||
|
||||
```java
|
||||
repositories = List.of(MAVEN_CENTRAL);
|
||||
scope(test)
|
||||
.include(dependency("org.pitest", "pitest", version(1, 14, 4)))
|
||||
.include(dependency("org.pitest", "pitest-command-line", version(1, 14, 4)))
|
||||
.include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 0)))
|
||||
.include(dependency("org.pitest", "pitest-testng-plugin", version(1, 0, 0)));
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue