// PiTest based mutation testing

pitest {
    targetClasses = ['org.hostsharing.hsadminng.*']

    excludedClasses = [
        // Unit Testing Spring configurations makes little sense in most cases.
        'org.hostsharing.hsadminng.config.*',
        'org.hostsharing.hsadminng.ApplicationWebXml',
        'org.hostsharing.hsadminng.HsadminNgApp',

        // Unit testing this would need PowerMock and
        // blackbox testing of random values has little value.
        'org.hostsharing.hsadminng.service.util.RandomUtil',

        // The following are mostly generated classes,
        // as soon as we amend these, consider removing the exclude.
        'org.hostsharing.hsadminng.**Criteria',
        'org.hostsharing.hsadminng.**MapperImpl',
        'org.hostsharing.hsadminng.aop.logging.*',
        'org.hostsharing.hsadminng.web.rest.vm.*',
        'org.hostsharing.hsadminng.security.jwt.TokenProvider',
        'org.hostsharing.hsadminng.web.api.*' // API helpers, not the API itself
    ]
    threads = 2

    // Do not set these limit lower! 96% each might sound great, but keep in mind:
    // 91%*91% means that ~8% of the code are NOT properly covered by automated tests
    // (100%-94%*96% = ~8%). Not counting defects which come through missing code :-)
    coverageThreshold = 94
    mutationThreshold = 96

    outputFormats = ['XML', 'HTML']
    timestampedReports = false
    verbose = false
}