From 4fdcf77e8e302aeb9e3b10b2a68a6465a23abc0f Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Thu, 11 Apr 2019 14:34:19 +0200 Subject: [PATCH] added mutation testing with pitest as a separate task (too slow because there are almost only IntTests) --- build.gradle | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 18617bfc..7f77ecd1 100644 --- a/build.gradle +++ b/build.gradle @@ -60,22 +60,6 @@ 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' group = 'org.hostsharing.hsadminng' @@ -137,7 +121,6 @@ jacoco { test.finalizedBy jacocoTestReport check.dependsOn jacocoTestCoverageVerification -check.dependsOn 'pitest' // Only for purely JHipster/MapStruct generated classes. // Please do NOT add any self coded classes! @@ -221,6 +204,22 @@ task cucumberTestReport(type: TestReport) { reportOn cucumberTest } +// --- PiTest mutation testing --- + +pitest { + targetClasses = ['org.hostsharing.hsadminng.*'] + 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 + + outputFormats = ['XML', 'HTML'] + timestampedReports = false + verbose = false +} + // ------------------------------ apply from: 'gradle/docker.gradle'