diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f88c281c78655946b706cf48584c6518c498844b..c521e99a48a99d176cf4bad4715bf94b7f7a2a56 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -104,9 +104,9 @@ sonarqube-check:
     paths:
       - .sonar/cache
   script: 
-      - "dotnet sonarscanner begin /k:\"kon0379DiplomaThesis\" /d:sonar.token=\"$SONAR_TOKEN\" /d:\"sonar.host.url=$SONAR_HOST_URL\" "
+      - "dotnet sonarscanner begin /k:\"kon0379DiplomaThesis\" /d:sonar.token=\"$SONAR_TOKEN\" /d:\"sonar.host.url=$SONAR_HOST_URL\" /d:sonar.cs.opencover.reportsPaths=\"**/TestResults/*/*.xml\""
       - "sudo dotnet build"
-      - "dotnet-coverage collect 'dotnet test' -f xml  -o 'coverage.xml'"
+      - "dotnet test --no-build --collect:\"XPlat Code Coverage\""
       - "dotnet sonarscanner end /d:sonar.token=\"$SONAR_TOKEN\""
   allow_failure: true
   only: