2015-09-18 2 views
1

Я использую SonarQube 5.1, sonar-runner 2.4, grails 2.4.4 и cobertura. Я могу сгенерировать файл coverage.xml, но затем использовать сонар-runner или mvn-сонар: сонар не показывает никакой тестовой оболочки в приборной панели SonarQube ... ничего ... Любая идея?Sonar не импортирует информацию о покрытии .xml

sonar-project.properties файл:

sonar.projectKey=test 
sonar.projectName=test 
sonar.projectVersion=1.0 

sonar.sources=src/java,src/groovy,grails-app/assets,grails-app/services,grails-app/controllers,grails-app/domain,grails-app/views 

sonar.language=grvy 
sonar.sourceEncoding=UTF-8 

sonar.dynamicAnalysis=reuseReports 

sonar.surefire.reportsPath=target/test-reports 
sonar.groovy.cobertura.reportPath=target/test-reports/cobertura/coverage.xml 

и вот след гидролокатора бегуна:

C:\Temp\sonar-runner-dist-2.4\sonar-runner-2.4 

"C:\Program Files\Java\jdk1.7.0_71\bin\java.exe" -cp "C:\Temp\sonar-runner-dist-2.4\sonar-runner-2.4\lib\sonar-runner-dist-2.4.jar" "-Drunner.home=C:\Temp\sonar-runner-dist-2.4\sonar-runner-2.4" "-Dproject.home=C:\test" org.sonar.runner.Main 

SonarQube Runner 2.4 

Java 1.7.0_71 Oracle Corporation (64-bit) 

Windows 7 6.1 amd64 

INFO: Runner configuration file: C:\Temp\sonar-runner-dist-2.4\sonar-runner-2.4\conf\sonar-runner.properties 

INFO: Project configuration file: C:\test\sonar-project.properties 

INFO: Default locale: "no_NO", source code encoding: "UTF-8" 

INFO: Work directory: C:\test\.\.sonar 

INFO: SonarQube Server 5.1 

INFO - Load global repositories 

INFO - Load global repositories (done) | time=384ms 

INFO - Server id: 20150918133629 

INFO - User cache: R:\Users\kho\.sonar\cache 

INFO - Install plugins 

INFO - Install JDBC driver 

INFO - Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 

INFO - Initializing Hibernate 

INFO - Load project repositories 

INFO - Load project repositories (done) | time=255ms 

INFO - Load project settings 

INFO - Load technical debt model 

INFO - Apply project exclusions 

WARN - 'sonar.dynamicAnalysis' is deprecated since version 4.3 and should no longer be used. 

INFO - ------------- Scan Abonnementsregisteret 

INFO - Load module settings 

INFO - Language is forced to grvy 

INFO - Load rules 

INFO - Base dir: C:\test 

INFO - Working dir: C:\test\.sonar 

INFO - Source paths: test/unit, test/integration, src/java, src/groovy, grails-app/assets, grails-app/services, grails-app/controllers 

grails-app/domain, grails-app/views 

INFO - Source encoding: UTF-8, default locale: no_NO 

INFO - Index files 

INFO - 23 files indexed 

INFO - Quality profile for grvy: Sonar way 

INFO - Sensor Lines Sensor 

INFO - Sensor Lines Sensor (done) | time=47ms 

INFO - Sensor QProfileSensor 

INFO - Sensor QProfileSensor (done) | time=9ms 

INFO - Sensor InitialOpenIssuesSensor 

INFO - Sensor InitialOpenIssuesSensor (done) | time=111ms 

INFO - Sensor ProjectLinksSensor 

INFO - Sensor ProjectLinksSensor (done) | time=34ms 

INFO - Sensor VersionEventsSensor 

INFO - Sensor VersionEventsSensor (done) | time=67ms 

INFO - Sensor CodeNarc 

INFO - Executing CodeNarc 

INFO - Loaded properties file in 72ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report1.xml] created. 

CodeNarc completed: (p1=0; p2=0; p3=0) 4030ms 

INFO - Loaded properties file in 1ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report2.xml] created. 

CodeNarc completed: (p1=0; p2=0; p3=2) 600ms 

INFO - Loaded properties file in 1ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report3.xml] created. 

CodeNarc completed: (p1=0; p2=0; p3=0) 158ms 

INFO - Loaded properties file in 0ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report4.xml] created. 

CodeNarc completed: (p1=0; p2=5; p3=0) 472ms 

INFO - Loaded properties file in 1ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report5.xml] created. 

CodeNarc completed: (p1=0; p2=0; p3=0) 84ms 

INFO - Loaded properties file in 0ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report6.xml] created. 

CodeNarc completed: (p1=0; p2=10; p3=2) 1271ms 

INFO - Loaded properties file in 1ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report7.xml] created. 

CodeNarc completed: (p1=0; p2=7; p3=0) 562ms 

INFO - Loaded properties file in 1ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report8.xml] created. 

CodeNarc completed: (p1=0; p2=0; p3=0) 241ms 

INFO - Loaded properties file in 1ms; 346 rules 

INFO - Loading ruleset from [file:C:\test\.sonar\codenarc\profile.xml] 

INFO - RuleSet configuration properties file [codenarc.properties] not found. 

INFO - No custom message bundle found for [codenarc-messages]. Using default messages. 

INFO - Report file [C:\test\.sonar\codenarc\report9.xml] created. 

CodeNarc completed: (p1=0; p2=0; p3=0) 81ms 

INFO - Sensor CodeNarc (done) | time=12286ms 

INFO - Sensor GroovySensor 

INFO - GMetrics completed: 542ms 

INFO - Sensor GroovySensor (done) | time=1091ms 

INFO - Sensor Groovy CoberturaSensor 

INFO - Analyzing Cobertura report: target/test-reports/cobertura/coverage.xml 

INFO - Sensor Groovy CoberturaSensor (done) | time=338ms 

INFO - Sensor SCM Sensor 

INFO - Sensor SCM Sensor (done) | time=45ms 

INFO - Sensor GroovySurefireSensor 

INFO - parsing C:\test\target\surefire-reports 

WARN - Reports path not found: C:\test\target\surefire-reports 

INFO - Sensor GroovySurefireSensor (done) | time=28ms 

INFO - Sensor CPD Sensor 

INFO - DefaultCpdEngine is used for grvy 

INFO - Cross-project analysis disabled 

INFO - Sensor CPD Sensor (done) | time=309ms 

INFO - No quality gate is configured. 

INFO - Compare to previous analysis (2015-09-18) 

INFO - Compare over 30 days (2015-08-19, analysis of Tue Sep 15 17:12:33 CEST 2015) 

INFO - Execute decorators... 

INFO - Store results in database 

INFO - Analysis reports generated in 83ms, dir size=9 KB 

INFO - Analysis reports compressed in 279ms, zip size=13 KB 

INFO - Analysis reports sent to server in 101ms 

INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/test 

INFO - Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report. 

INFO: EXECUTION SUCCESS 
+0

Никто не мог помочь? – user1343348

ответ

2

Найдено решение, которое работает для меня. я мог бы помочь другим: я в конечном итоге работает следующим образом:

grails test-app unit: -echoOut -coverage -xml -nopost --non-interactive --plain-output --stacktrace --verbose 

Тогда результат покрытия обнаружился.

Удачи вам!

+0

Проверьте также, что у вас есть правильный путь «sonar.sources» в файле sonar-project.properties. – user1343348

+0

. Необходимо использовать сонар-бегун Allso. – user1343348

Смежные вопросы