- you might be forgetting to use the sourcepath option in order to link the report to the source code. You do it via the "sourcepath" attribute or <sourcepath> nested element in ANT (http://emma.sourceforge.net/reference/ch02s04s02.html) or via -sp (-sourcepath) command line option (http://emma.sourceforge.net/reference/ch02s04s03.html)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are not using the ANT option and are operating through the command line options. Lets say we have an application A.java, please specify how to view the source code in different colours in the HTML report using emma tool.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I thing my problem is the step before, which I can't understand:
C:\testing\emma-2.0.4217\examples>java emma instr -d outinstr -ip out
EMMA: processing instrumentation path ...
EMMA: instrumentation path processed in 210 ms
EMMA: [3 class(es) instrumented, 0 resource(s) copied]
EMMA: metadata merged into [C:\testing\emma-2.0.4217\examples\coverage.em] {in 50 ms}
C:\testing\emma-2.0.4217\examples>java -cp outinstr; out Main
Exception in thread "main" java.lang.NoClassDefFoundError: out
, but out contains Main.class
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Doesn't -sp command line option (for run/report tool) work for you?
I repeat my previous question: I need more details. Is it (a) you don't know how to do this or (b) you think you know how to do it, but it just isn't working?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<quote>
C:\testing\emma-2.0.4217\examples>java -cp outinstr; out Main
Exception in thread "main" java.lang.NoClassDefFoundError: out
, but out contains Main.class
</quote>
You have a space between "outinstr;" and "out". I think you must have copied this straight out of the user guide. But the user guide has a little callout icon after the semicolon. Remove the space.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<quote>
C:\testing\emma-2.0.4217\examples>java -cp outinstr; out Main
Exception in thread "main" java.lang.NoClassDefFoundError: out
, but out contains Main.class
</quote>
Its all true. Thank You!
Intimately: Vlad, where are you coming from? Best regards Viktor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<quote>Intimately: Vlad, where are you coming from? Best regards Viktor</quote>
I didn't expect to get intimate with my users so quickly :), but if you'd like to ask a personal question you can always get in touch with me through my SourceForge alias.
Cheers,
Vlad.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how to view source code in html report using emma.
I hava the same problem!!!
Could you elaborate on what your problem is more specifically?
Here are a few resources available that show how to link an HTML report to the source code:
- the sample reports on EMMA web site are accompanied with the *exact* steps used to generate them: http://emma.sourceforge.net/samples.html
- you might be forgetting to use the sourcepath option in order to link the report to the source code. You do it via the "sourcepath" attribute or <sourcepath> nested element in ANT (http://emma.sourceforge.net/reference/ch02s04s02.html) or via -sp (-sourcepath) command line option (http://emma.sourceforge.net/reference/ch02s04s03.html)
We are not using the ANT option and are operating through the command line options. Lets say we have an application A.java, please specify how to view the source code in different colours in the HTML report using emma tool.
I thing my problem is the step before, which I can't understand:
C:\testing\emma-2.0.4217\examples>java emma instr -d outinstr -ip out
EMMA: processing instrumentation path ...
EMMA: instrumentation path processed in 210 ms
EMMA: [3 class(es) instrumented, 0 resource(s) copied]
EMMA: metadata merged into [C:\testing\emma-2.0.4217\examples\coverage.em] {in 50 ms}
C:\testing\emma-2.0.4217\examples>java -cp outinstr; out Main
Exception in thread "main" java.lang.NoClassDefFoundError: out
, but out contains Main.class
Doesn't -sp command line option (for run/report tool) work for you?
I repeat my previous question: I need more details. Is it (a) you don't know how to do this or (b) you think you know how to do it, but it just isn't working?
<quote>
C:\testing\emma-2.0.4217\examples>java -cp outinstr; out Main
Exception in thread "main" java.lang.NoClassDefFoundError: out
, but out contains Main.class
</quote>
You have a space between "outinstr;" and "out". I think you must have copied this straight out of the user guide. But the user guide has a little callout icon after the semicolon. Remove the space.
<quote>
C:\testing\emma-2.0.4217\examples>java -cp outinstr; out Main
Exception in thread "main" java.lang.NoClassDefFoundError: out
, but out contains Main.class
</quote>
Its all true. Thank You!
Intimately: Vlad, where are you coming from? Best regards Viktor
<quote>Intimately: Vlad, where are you coming from? Best regards Viktor</quote>
I didn't expect to get intimate with my users so quickly :), but if you'd like to ask a personal question you can always get in touch with me through my SourceForge alias.
Cheers,
Vlad.