Мокко-Дженкинс-репортер и SonarQube - PullRequest
0 голосов
/ 09 января 2020

Я пытаюсь интегрировать результаты mocha-jenkins-reporter в SonarQube. Сценарий сборки запускает следующие команды:

set "JUNIT_REPORT_PATH=report.xml"
set "JENKINS_REPORTER_ENABLE_SONAR=true"
set "JENKINS_REPORTER_TEST_DIR=tests"
call npm run test-jenkins

После завершения команд я вижу новый файл report.xml. Но с этого момента я не знаю, как интегрировать это в SonarQube. Описание mocha-jenkins-reporter здесь не очень полезно (выдержка из https://www.npmjs.com/package/mocha-jenkins-reporter):

SonarQube is a popular tool for continuous inspection of code quality. You can find 
documentation for JavaScript language on JavaScript Plugin page.

One aspect of SonarQube analysis is outcome of unit tests. To properly display test results 
environment variable JENKINS_REPORTER_ENABLE_SONAR must be set to true. By default reporter 
looks for tests in ./test directory. It can be changed using environment variable 
JENKINS_REPORTER_TEST_DIR and providing relative path to the directory with tests.

Я предполагаю, что мне нужно изменить sonar-project.properties, но я не смог найти полезная информация об этом.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...