PIT Mutation Testing and Coverage for bld https://github.com/rife2/bld-pitest
Find a file
2024-03-21 00:27:45 -07:00
.github/workflows Inital commit 2023-08-29 08:47:13 -07:00
.idea Bumped to bld 1.9.0 2024-03-21 00:27:45 -07:00
.vscode Bumped to bld 1.9.0 2024-03-21 00:27:45 -07:00
config Inital commit 2023-08-29 08:47:13 -07:00
examples Bumped to bld 1.9.0 2024-03-21 00:27:45 -07:00
lib/bld Bumped to bld 1.9.0 2024-03-21 00:27:45 -07:00
src Bumped to bld 1.9.0 2024-03-21 00:27:45 -07:00
.gitignore Inital commit 2023-08-29 08:47:13 -07:00
bld Inital commit 2023-08-29 08:47:13 -07:00
bld.bat Inital commit 2023-08-29 08:47:13 -07:00
checkcliargs.sh Added script to check CLI arguments 2024-01-29 02:22:47 -08:00
LICENSE.txt Inital commit 2023-08-29 08:47:13 -07:00
README.md Bumped to bld 1.9.0 2024-03-21 00:27:45 -07:00

PIT Mutation Testing Extension for bld

License Java bld Release Snapshot GitHub CI

To install, please refer to the extensions documentation.

To run mutation tests and coverage, add the following to your build file:

@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

Please check the PitestOperation documentation 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:

repositories = List.of(MAVEN_CENTRAL);
scope(test)
    .include(dependency("org.pitest", "pitest", version(1, 15, 8)))
    .include(dependency("org.pitest", "pitest-command-line", version(1, 15, 8)))
    .include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 1)))
    .include(dependency("org.pitest", "pitest-testng-plugin", version(1, 0, 0)));