2013-04-02 20 views

Odpowiedz

0

Jeśli używasz Ant, można użyć (zawiadomienie 'format = "html"'):

<cob:cobertura-report format="html" datafile="${cobertura.ser.file}" destdir="${todir}"> 
    <fileset dir="${srcdir}" includes="**/*.java"/> 
</cob:cobertura-report> 

Z pom maven, patrz: the manual, np:

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>cobertura-maven-plugin</artifactId> 
    <configuration> 
    <formats> 
     <format>html</format> 
     <!-- format>xml</format --> 
    </formats> 
    </configuration> 
</plugin> 

Za pomocą skryptu wiersza polecenia można również zapoznać się z the manual, np .:

cobertura-report.bat --format html --datafile C:\MyProject\build\cobertura.ser --destination C:\MyProject\reports\coverage C:\MyProject\src 
+0

Co zrobić, jeśli plik xml pochodzi z lcov-to-cobertura? – Penz

+0

Zajrzałbym do tego opartego na pythonie [narzędzia do określonego celu] (http://eriwen.github.io/lcov-to-cobertura-xml/), chociaż sam go nie używałem. –

+4

Używam już czapki do utworzenia cobertura.xml z testów gcov - potrzebuję sposobu na wygenerowanie raportów HTML z pliku cobertura.xml. – Penz

Powiązane problemy