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
name | what reports call it, pricing or app/api |
|---|---|
java | the java the test task runs, so tests run on the project’s own JDK |
jvmArgs | the test task’s JVM arguments (--enable-preview, system properties) |
workingDirectory | where the test task runs, since tests read files by relative path |
classes | the main class directories: what gets mutated |
resources | the main resource directories |
testClasses | the test class directories |
testResources | the test resource directories |
sources | the main source directories, for showing code |
testSources | the test source directories, for writing suggested tests in their style |
dependencies | the rest of the test runtime classpath, which brings JUnit |
alongside | production classes loaded with the mutated ones but not mutated: another module’s own code, when its tests run over this module’s mutants |
outputs | what 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 |
tests | which tests the build runs |
environment | the 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.