PIT Mutation Testing and Coverage for bld https://github.com/rife2/bld-pitest
Find a file
2025-02-12 14:53:31 -08:00
.github/workflows Updated to the latest artifacts actions versions 2025-02-11 11:57:27 -08:00
.idea Version 1.0.7 2025-01-14 11:00:23 -08:00
.vscode Bumped bld to version 2.2.0 2025-01-13 22:12:35 -08:00
config Updated dependencies 2024-10-27 17:10:59 -07:00
examples Version 1.0.9 2025-02-12 14:53:31 -08:00
lib/bld Version 1.0.8 2025-02-11 12:12:06 -08:00
scripts Execute cliargs script before running tests 2024-05-28 14:27:54 -07:00
src Version 1.0.9 2025-02-12 14:53:31 -08: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
LICENSE.txt Inital commit 2023-08-29 08:47:13 -07:00
README.md Bumped PIT to version 1.18.1 2025-02-12 14:53:05 -08: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"))
        .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, 18, 1)))
    .include(dependency("org.pitest", "pitest-command-line", version(1, 17, 4)))
    .include(dependency("org.pitest", "pitest-junit5-plugin", version(1, 2, 1)))
    .include(dependency("org.pitest", "pitest-testng-plugin", version(1, 0, 0)));