added mutation testing with pitest as a separate task (too slow because there are almost only IntTests)

This commit is contained in:
Michael Hoennig 2019-04-11 12:51:07 +02:00
parent e7e38f68b5
commit 19c0049b0e

View File

@ -27,6 +27,7 @@ plugins {
id "io.spring.dependency-management" version "1.0.6.RELEASE" id "io.spring.dependency-management" version "1.0.6.RELEASE"
id "com.moowork.node" version "1.2.0" id "com.moowork.node" version "1.2.0"
id 'org.liquibase.gradle' version '2.0.1' id 'org.liquibase.gradle' version '2.0.1'
id 'info.solidsoft.pitest' version '1.4.0'
//jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here //jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here
} }
@ -59,6 +60,22 @@ dependencyManagement {
} }
} }
pitest {
targetClasses = ['org.hostsharing.hsadminng.*']
excludedClasses = ['*IntTest']
threads = 4
// Do not set these limit even lower, they are already pretty bad values!
// 83%*73% means that only ~60% of the code properly covered by automated tests.
mutationThreshold = 73
coverageThreshold = 83
timeoutFactor = 3.0
outputFormats = ['XML', 'HTML']
timestampedReports = false
verbose = false
}
defaultTasks 'bootRun' defaultTasks 'bootRun'
group = 'org.hostsharing.hsadminng' group = 'org.hostsharing.hsadminng'
@ -120,6 +137,7 @@ jacoco {
test.finalizedBy jacocoTestReport test.finalizedBy jacocoTestReport
check.dependsOn jacocoTestCoverageVerification check.dependsOn jacocoTestCoverageVerification
check.dependsOn 'pitest'
// Only for purely JHipster/MapStruct generated classes. // Only for purely JHipster/MapStruct generated classes.
// Please do NOT add any self coded classes! // Please do NOT add any self coded classes!