Exclude frontend unit tests from sonar qube code coverage

This commit is contained in:
Konstantin Schaper
2020-05-19 08:03:33 +02:00
parent d95dcfb038
commit 448dfb4511
2 changed files with 2 additions and 1 deletions

1
Jenkinsfile vendored
View File

@@ -199,6 +199,7 @@ Maven setupMavenBuild() {
def logConf = "scm-webapp/src/main/resources/logback.ci.xml"
mvn.additionalArgs += " -Dlogback.configurationFile=${logConf}"
mvn.additionalArgs += " -Dscm-it.logbackConfiguration=${logConf}"
mvn.additionalArgs += " -Dsonar.coverage.exclusions=**/*.test.ts,**/*.test.tsx"
if (isMainBranch() || isReleaseBranch()) {
// Release starts javadoc, which takes very long, so do only for certain branches

View File

@@ -954,7 +954,7 @@
<sonar.cpd.exclusions>**/*StoreFactory.java,**/*UserPassword.js</sonar.cpd.exclusions>
<sonar.nodejs.executable>./scm-ui/target/frontend/buildfrontend-node/node-v${nodejs.version}-linux-x64/bin/node</sonar.nodejs.executable>
<sonar.coverage.exclusions>**/*.test.ts</sonar.coverage.exclusions>
<sonar.coverage.exclusions>**/*.test.ts,**/*.test.tsx</sonar.coverage.exclusions>
<!-- Possibility to skip only the unit test. Can be useful when running only integration tests.
This can be used from the command line as follows: mvn <goals> -DskipUnitTests -->