Skip to content

Commit

Permalink
Merge branch 'pr/247' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
szpak committed Mar 4, 2021
2 parents 447eee3 + 9e87a17 commit 39956b0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 1.6.0 - Unreleased

- **Report aggregation for multi-project builds** - [#243](https://github.com/szpak/gradle-pitest-plugin/pull/243) - PR by [Mike Safonov](https://github.com/MikeSafonov)
- Support new configuration property `testStrengthThreshold` (PIT 1.6.1+) - [#247](https://github.com/szpak/gradle-pitest-plugin/pull/247) - PR by [Michael Hönnig](https://github.com/mhoennig)
- PIT 1.6.3 by default
- Regression tests also with Gradle 7 (milestone)
- Upgrade Gradle wrapper to 6.8.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The Pitest plugin does not need to be additionally configured if you use JUnit 4
```groovy
pitest {
targetClasses = ['our.base.package.*'] //by default "${project.group}.*"
pitestVersion = '1.5.1' //not needed when a default PIT version should be used
pitestVersion = '1.5.2' //not needed when a default PIT version should be used
threads = 4
outputFormats = ['XML', 'HTML']
timestampedReports = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ class PitestPlugin implements Plugin<Project> {
//defaultFileForHistoryData - separate method
task.mutationThreshold.set(extension.mutationThreshold)
task.coverageThreshold.set(extension.coverageThreshold)
task.testStrengthThreshold.set(extension.testStrengthThreshold)
task.mutationEngine.set(extension.mutationEngine)
task.exportLineCoverage.set(extension.exportLineCoverage)
task.jvmPath.set(extension.jvmPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class PitestPluginExtension {
final Property<Boolean> enableDefaultIncrementalAnalysis //specific for Gradle plugin
final Property<Integer> mutationThreshold
final Property<Integer> coverageThreshold
final Property<Integer> testStrengthThreshold
final Property<String> mutationEngine
final Property<Boolean> exportLineCoverage //for debugging usage only
final RegularFileProperty jvmPath
Expand Down Expand Up @@ -251,6 +252,7 @@ class PitestPluginExtension {
enableDefaultIncrementalAnalysis = of.property(Boolean)
mutationThreshold = of.property(Integer)
coverageThreshold = of.property(Integer)
testStrengthThreshold = of.property(Integer)
mutationEngine = of.property(String)
exportLineCoverage = of.property(Boolean)
jvmPath = of.fileProperty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ class PitestTask extends JavaExec {
@Optional
final Property<Integer> coverageThreshold

@Input
@Optional
final Property<Integer> testStrengthThreshold

@Input
@Optional
final Property<String> mutationEngine
Expand Down Expand Up @@ -276,6 +280,7 @@ class PitestTask extends JavaExec {
defaultFileForHistoryData = of.fileProperty()
mutationThreshold = of.property(Integer)
coverageThreshold = of.property(Integer)
testStrengthThreshold = of.property(Integer)
mutationEngine = of.property(String)
exportLineCoverage = of.property(Boolean)
jvmPath = of.fileProperty()
Expand Down Expand Up @@ -361,6 +366,7 @@ class PitestTask extends JavaExec {
map['mutableCodePaths'] = (getMutableCodePaths()*.absolutePath)?.join(',')
map['mutationThreshold'] = optionalPropertyAsString(mutationThreshold)
map['coverageThreshold'] = optionalPropertyAsString(coverageThreshold)
map['testStrengthThreshold'] = optionalPropertyAsString(testStrengthThreshold)
map['mutationEngine'] = mutationEngine.getOrNull()
map['exportLineCoverage'] = optionalPropertyAsString(exportLineCoverage)
map['includeLaunchClasspath'] = Boolean.FALSE.toString() //code to analyse is passed via classPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class PitestTaskConfigurationSpec extends BasicProjectBuilderSpec implements Wit
'timestampedReports',
'mutationThreshold',
'coverageThreshold',
'testStrengthThreshold',
'mutationEngine',
'exportLineCoverage',
'jvmPath',
Expand Down Expand Up @@ -160,6 +161,7 @@ class PitestTaskConfigurationSpec extends BasicProjectBuilderSpec implements Wit
//enableDefaultIncrementalAnalysis tested separately
"mutationThreshold" | 90 || "90"
"coverageThreshold" | 95 || "95"
"testStrengthThreshold" | 95 || "95"
"mutationEngine" | "gregor2" || "gregor2"
"exportLineCoverage" | true || "true"
"jvmPath" | new File("//opt//jvm15//") || new File("//opt//jvm15//").path
Expand Down

0 comments on commit 39956b0

Please sign in to comment.