Emma non incorpora il codice sorgente di report HTML
-
23-08-2019 - |
Domanda
Ho un problema con Ant e Emma un plugin copertura del codice, fa rapporto, ma senza codice sorgente.
Mi sono seguente codice nel mio build.xml
init emma
<taskdef resource="emma_ant.properties" />
<path id="run.classpath">
<pathelement location="${instr}" />
<path refid="build.classpath"/>
<pathelement path="${ant.home}/lib/junit-4.5.jar"/>
<pathelement path="${ant.home}/lib/emma.jar"/>
</path>
rendendo Strumenti
<target name="instr" depends="compile">
<emma>
<instr instrpathref="build.classpath"
destdir="${instr}"
metadatafile="${coverage}/metadata.emma"
merge="true"
/>
</emma>
</target>
impostazione delle proprietà
<jvmarg value="-Demma.coverage.out.file=${coverage}/coverage.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
fare rapporto
<emma>
<report sourcepath="${src}" >
<fileset dir="${coverage}" >
<include name="*.emma" />
</fileset>
<html outfile="${coverage}/coverage.html"/>
</report>
</emma>
Questo funziona bello. Produce per console:
[report] processing input files ...
[report] 2 file(s) read and merged in 10 ms
[report] not all instrumented classes were compiled with source file
[report] debug data: no sources will be embedded in the report.
[report] line coverage requested in a report of type [html] but
[report] not all instrumented classes were compiled with line number
[report] debug data: this column will be removed from the report.
[report] showing up to 3 classes without full debug info per package:
[report] ...
[report] writing [html] report to [C:\...] ...
Voglio vedere il mio codice sorgente nella relazione, come posso risolvere il problema? Ho studiato la documentazione di emma e purtroppo non c'è nulla relative a questo problema.
Grazie per le risposte.
Soluzione
Ok, ho risolto un problema.
Ho aggiunto debug="true"
per javac e funziona ora.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow