Mam następujący cel Sonar Ant zdefiniowane:Jak uzyskać Sonar do eksportowania statystyk testowych?
<target name='sonar'>
<property name='sonar.sources' value='${src.dir}'/>
<property name='sonar.tests' value='${test.src.dir}'/>
<property name='sonar.binaries' value='build/classes'/>
<path id='jars'>
<fileset dir='${env.JAVA_HOME}/jre/lib' includes='*.jar'/>
<fileset dir='build/lib/test' includes='*.jar'/>
</path>
<pathconvert property='sonar.libraries' refid='jars' pathsep=','/>
<exec executable='p4' outputproperty='p4.P4CLIENT'>
<arg value='set'/>
<arg value='P4CLIENT'/>
</exec>
<propertyregex
property='p4client'
input='${p4.P4CLIENT}'
regexp='P4CLIENT=([^ ]+) *.*'
replace='\1'/>
<propertyregex
property='sonar.timestamp'
input='${build.time}'
regexp='_'
replace='T'/>
<sonar:sonar key='com.netflix:${module.name}' version='${p4client}@${sonar.timestamp}' xmlns:sonar='antlib:org.sonar.ant'/>
<property name='sonar.dynamicAnalysis' value='reuseReports'/>
<property name='sonar.emma.reportPath' value='${coverage.dir}'/>
</target>
Kiedy biegnę „ant sonar” i wychować Sonar w przeglądarce, widzę informacji o zajęciach w katalogu src, ale nic o rzeczy w katalog testowy.
Jeśli dodaję $ {test.src.dir} do sonar.sources i nie ustawię sonar.tests, widzę pewne informacje o klasach testowych, ale Sonar nadal zgłasza 0 sukcesów testowych.
Jak mogę to zrobić, aby przejść do każdej metody testowania i ich statystyk?
Witam Mam [podobny problem] (http://stackoverflow.com/questions/21267948/sonarqube-test-coverage-report-for-android-built-with-ant), ale nie do końca taki sam. .. jak wybraliście plik .emma? – JaKXz
Właściwie przestaliśmy używać sonaru i będziemy budować własne repozytorium danych o kompilacji. –