Extension class with configurable parameters for Pitest plugin. Note: additionalClasspath, mutableCodePaths, sourceDirs, reportDir and pitestVersion are automatically set using project configuration. sourceDirs, reportDir and pitestVersion can be overridden by an user.
| Type | Name and description |
|---|---|
java.util.Set<java.io.File> |
additionalMutableCodePathsAdditional mutableCodePaths (paths with production classes which should be mutated). |
java.util.Set<java.lang.String> |
avoidCallsTo |
java.lang.Integer |
coverageThreshold |
java.lang.Integer |
dependencyDistance |
java.lang.Boolean |
detectInlinedCode |
java.lang.Boolean |
enableDefaultIncrementalAnalysis |
java.util.Set<java.lang.String> |
excludedClasses |
java.util.Set<java.lang.String> |
excludedGroups |
java.util.Set<java.lang.String> |
excludedMethods |
java.util.Set<java.lang.String> |
excludedTestClassesA list of test classes which should be excluded when mutating. |
java.lang.Boolean |
exportLineCoverage |
java.lang.Boolean |
failWhenNoMutations |
java.util.List<java.lang.String> |
featuresTurnes on/off features in PIT itself and its plugins. |
java.util.List<java.lang.String> |
fileExtensionsToFilterFile extensions which should be filtered from a classpath. |
java.io.File |
historyInputLocation |
java.io.File |
historyOutputLocation |
java.lang.Boolean |
includeJarFiles |
java.util.Set<java.lang.String> |
includedGroups |
java.util.List<java.lang.String> |
jvmArgsJVM arguments to use when PIT launches child processes |
java.io.File |
jvmPath |
java.util.List<java.lang.String> |
mainProcessJvmArgsJVM arguments to use when Gradle plugin launches the main PIT process. |
java.util.Set<com.android.build.gradle.api.AndroidSourceSet> |
mainSourceSets |
java.lang.Integer |
maxMutationsPerClass |
java.lang.Integer |
maxSurviving |
java.lang.Boolean |
mutateStaticInits |
java.lang.String |
mutationEngine |
java.lang.Integer |
mutationThreshold |
java.util.Set<java.lang.String> |
mutators |
java.util.Set<java.lang.String> |
outputFormats |
java.lang.String |
pitestVersion |
java.util.Map<java.lang.String, java.lang.String> |
pluginConfigurationPlugin configuration parameters. |
java.io.File |
reportDir |
java.util.Set<java.lang.String> |
targetClasses |
java.util.Set<java.lang.String> |
targetTests |
java.lang.String |
testPluginSpecifies what test plugin to use. |
java.lang.Integer |
threads |
java.lang.Integer |
timeoutConstInMillis |
BigDecimal |
timeoutFactor |
java.lang.Boolean |
timestampedReports |
boolean |
useClasspathFileUse classpath file instead of passing classpath in a command line |
java.lang.Boolean |
verbose |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
setClassPathFile(java.io.File classPathFile)The first (broken) implementation of using a file to pass additional classpath to PIT. |
|
void |
setHistoryInputLocation(java.lang.String historyInputLocationPath) |
|
void |
setHistoryOutputLocation(java.lang.String historyOutputLocationPath) |
|
void |
setJvmPath(java.lang.String jvmPathAsString) |
|
void |
setReportDir(java.lang.String reportDirAsString) |
|
void |
setSourceDirs(java.util.Set<java.lang.String> sourceDirs) |
|
void |
setSourceDirsAsFiles(java.util.Set<java.io.File> sourceDirs) |
|
void |
setTimeoutFactor(java.lang.String timeoutFactor) |
|
void |
setWithHistory(java.lang.Boolean withHistory)Alias for enableDefaultIncrementalAnalysis. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Additional mutableCodePaths (paths with production classes which should be mutated).
By default all classes produced by default sourceSets (or defined via mainSourceSets property) are used as production code to mutate. In some rare cases it is required to pass additional classes, e.g. from JAR produced by another subproject. Issue #25. Samples usage ("itest" project depends on "shared" project):
configure(project(':itest')) {* dependencies {* compile project(':shared')
}*
apply plugin: "pl.droidsonroids.pitest"
//mutableCodeBase - additional configuration to resolve :shared project JAR as mutable code path for PIT
configurations { mutableCodeBase { transitive false }}* dependencies { mutableCodeBase project(':shared') }* pitest {* mainSourceSets = [project.sourceSets.main, project(':shared').sourceSets.main]
additionalMutableCodePaths = [configurations.mutableCodeBase.singleFile]
}*}*
A list of test classes which should be excluded when mutating.
Turnes on/off features in PIT itself and its plugins. Some details: https://github.com/hcoles/pitest/releases/tag/pitest-parent-1.2.1
File extensions which should be filtered from a classpath. PIT fails on not Java specific file passed on a classpath (e.g. native libraries). Native libraries ('*.so', '*.dll', '*.dylib') and '*.pom' files are filtered by default, but a developer can add extra extensions to the list:
pitest {
fileExtensionsToFilter += ['xml', 'orbit']
}
Rationale: https://github.com/szpak/gradle-pitest-plugin/issues/53
This feature is specific to the Gradle plugin.
JVM arguments to use when PIT launches child processes
Note. This parameter type was changed from String to List
JVM arguments to use when Gradle plugin launches the main PIT process.
Plugin configuration parameters. Should be defined a map:
pitest {
pluginConfiguration = ["plugin1.key1": "value1", "plugin1.key2": "value2"]
}
Specifies what test plugin to use. Prior to 1.3.0 this was autodetected, now it has to be specified. The junit plugin is used by default.
Use classpath file instead of passing classpath in a command line Useful with very long classpath and Windows - see https://github.com/hcoles/pitest/issues/276 Disabled by default.
The first (broken) implementation of using a file to pass additional classpath to PIT. Use "useClasspathFile" property instead.
Alias for enableDefaultIncrementalAnalysis. To make migration from PIT Maven plugin to PIT Gradle plugin easier.