Skip to content
mutastic

Project

record in io.mutastic.api

record Project(
String name,
Path java,
List<String> jvmArgs,
Path workingDirectory,
List<Path> classes,
List<Path> resources,
List<Path> testClasses,
List<Path> testResources,
List<Path> sources,
List<Path> testSources,
List<Path> dependencies,
List<Path> alongside,
List<Path> outputs,
TestSelection tests,
Map<String, String> environment)

One module’s code and tests, and how its build runs them: what a build-tool integration reads from the module’s test task.

Components

namewhat reports call it, pricing or app/api
javathe java the test task runs, so tests run on the project’s own JDK
jvmArgsthe test task’s JVM arguments (--enable-preview, system properties)
workingDirectorywhere the test task runs, since tests read files by relative path
classesthe main class directories: what gets mutated
resourcesthe main resource directories
testClassesthe test class directories
testResourcesthe test resource directories
sourcesthe main source directories, for showing code
testSourcesthe test source directories, for writing suggested tests in their style
dependenciesthe rest of the test runtime classpath, which brings JUnit
alongsideproduction classes loaded with the mutated ones but not mutated: another module’s own code, when its tests run over this module’s mutants
outputswhat another module’s classpath has of this one (its class directories, its jar), taken off that classpath when its tests run over this module’s mutants
testswhich tests the build runs
environmentthe environment variables the build sets for its tests, beyond its own

Methods

withTests

Project withTests(TestSelection chosen)

The same project, its tests chosen by chosen.

runningTestsOf

Project runningTestsOf(Project runner, Path build)

The project whose mutants are this one’s, run by runner’s tests, as runner’s build runs them: its JDK, JVM arguments, working directory, tests, environment and classpath, with this module’s outputs taken off it and its own code loaded beside the mutated classes.

So is any other module of the build on its classpath, as one may use this module’s classes: loaded as a library, it would find none of them. A third-party library is outside the build.