From 19c0049b0e32ff8f9f61f367f19263253e46d3d1 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Thu, 11 Apr 2019 12:51:07 +0200 Subject: [PATCH] added mutation testing with pitest as a separate task (too slow because there are almost only IntTests) --- build.gradle | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/build.gradle b/build.gradle index 1080f616..18617bfc 100644 --- a/build.gradle +++ b/build.gradle @@ -27,6 +27,7 @@ plugins { id "io.spring.dependency-management" version "1.0.6.RELEASE" id "com.moowork.node" version "1.2.0" 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 } @@ -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' group = 'org.hostsharing.hsadminng' @@ -120,6 +137,7 @@ 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!