Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » How do I get Code Coverage analysis?
How do I get Code Coverage analysis? [message #112184] Mon, 10 September 2007 18:34 Go to next message
Eclipse UserFriend
Originally posted by: mlevison.gmail.com

I'm using Eclipse 3.3, TPTP 4.3 (although some features report 4.4) and
am using Java 1.5. I can't seem to generate any Code Coverage analysis
from running my plugin tests.

My setup: My test project is fragment that runs inside of the context of
the main plugin. The tests are run as JUnit Plugin tests.

When I profile the tests I get execution analysis data and can browse
where the time was spent, but the code coverage window says:

No execution statistics is available for display.
Either you have no trace selected in the Profiling Monitor view or
the current selection does not contain execution statistic information.

Note:
This view is available only if the trace contains execution
statistics. To collect this type of information, on the Profile tab in
the Launch configuration, choose the Execution Time Analysis option.

But this exactly what I set in the profiling window. So I ask How do I
get Code Coverage of my plugin tests using Java 1.5?

Cheers
Mark Levison
Re: How do I get Code Coverage analysis? [message #112737 is a reply to message #112184] Wed, 19 September 2007 12:40 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Mark,
For Java 1.5+, JVMPI has been replaced with JVMTI, which does
not support method level code coverage. In TPTP and Java 1.4 or less, you
can use the Method Level code coverage
function. Method Level code coverage is another analysis type for the Java
Profiler data
collector in the Profiling launch configuration. For more information, see:

http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. tptp.platform.doc.user/tasks/tevwcode.htm

If you are interested in using the TPTP Method Level code coverage with
TPTP JUnit/Plug-in tests, please see the work-around here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=138736#c17

TPTP does provide a line level code coverage tool as a Technology
Preview. However, this tooling is depredated (in place of EMMA integration)
and cannot be used with test execution. You can
learn about the TPTP Line Level Code Coverage tool (including a viewlet) for
the latest release at:

http://www.eclipse.org/tptp/home/downloads/downloads.php >> Deprecated
Technology
Previews >> Code Coverage

Moving forward, we are working at integrating EMMA for line level code
coverage with test execution in TPTP (see defect
https://bugs.eclipse.org/bugs/show_bug.cgi?id=170800). Please feel free to
comment or contribute to this defect.

Paul
"Mark Levison" <mlevison@gmail.com> wrote in message
news:fc42nd$21i$1@build.eclipse.org...
> I'm using Eclipse 3.3, TPTP 4.3 (although some features report 4.4) and am
> using Java 1.5. I can't seem to generate any Code Coverage analysis from
> running my plugin tests.
>
> My setup: My test project is fragment that runs inside of the context of
> the main plugin. The tests are run as JUnit Plugin tests.
>
> When I profile the tests I get execution analysis data and can browse
> where the time was spent, but the code coverage window says:
>
> No execution statistics is available for display.
> Either you have no trace selected in the Profiling Monitor view or the
> current selection does not contain execution statistic information.
>
> Note:
> This view is available only if the trace contains execution statistics.
> To collect this type of information, on the Profile tab in the Launch
> configuration, choose the Execution Time Analysis option.
>
> But this exactly what I set in the profiling window. So I ask How do I get
> Code Coverage of my plugin tests using Java 1.5?
>
> Cheers
> Mark Levison
Previous Topic:changing the RAC port makes eclipse crash when trying to verify the deployment
Next Topic:'Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found'
Goto Forum:
  


Current Time: Fri Apr 26 01:00:05 GMT 2024

Powered by FUDForum. Page generated in 0.02985 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top