Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Can JUnit Plugin tests be profiled?
Can JUnit Plugin tests be profiled? [message #111054] Fri, 31 August 2007 18:34 Go to next message
Eclipse UserFriend
Originally posted by: mlevison.gmail.com

We run our tests as "JUnit Plug-in Tests" so that we can access the
filesystem and things like Display. However as I go to do code coverage
work I struggling to make it work.

Can I profile tests that are run as Plugin tests? I think this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=75029
is telling me no.

Is there a trick or do we just have to guess at our code coverage?

Cheers
Mark Levison
Re: Can JUnit Plugin tests be profiled? [message #111065 is a reply to message #111054] Fri, 31 August 2007 20:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mlevison.gmail.com

Mark Levison wrote:
> We run our tests as "JUnit Plug-in Tests" so that we can access the
> filesystem and things like Display. However as I go to do code coverage
> work I struggling to make it work.

Ok I figure the first part out - apparently my unstated goal of the day
- make a fool of myself in public.

Just for the record all I needed to do was open the Profile Dialog and
it gave me all sort of options.

Problem #2 I'm only seeing profile data for my test plugin not for the
code under test. The code in the test plugin and primary plugin share
the same name space (although the test plugin is not currently a
fragment). Even though it should be necessary I've mucked around with
the default filter to include all the possibly relevant code. Finally
code from other plugins is covered. Is my problem merely that my test
plugin isn't a fragment?

Problem #3 Running under Java 1.5 I don't seem to have an option to
generate code coverage - just Execution Time Analysis. When I go to the
Profiling perspective I can't find any options to get coverage statistics.

Cheers
Mark Levison
Re: Can JUnit Plugin tests be profiled? [message #112631 is a reply to message #111054] Wed, 19 September 2007 11:56 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Mark,
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:fb9n0f$gps$1@build.eclipse.org...
> We run our tests as "JUnit Plug-in Tests" so that we can access the
> filesystem and things like Display. However as I go to do code coverage
> work I struggling to make it work.
>
> Can I profile tests that are run as Plugin tests? I think this bug:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=75029
> is telling me no.
>
> Is there a trick or do we just have to guess at our code coverage?
>
> Cheers
> Mark Levison
Re: Can JUnit Plugin tests be profiled? [message #112645 is a reply to message #111065] Wed, 19 September 2007 12:00 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Mark,

Problem #2: This appears to be a filtering problem. As long as the
dependences are correct, it should not matter that your test plug-in is not
a fragment.

Problem #3: For Java 1.5+, JVMPI has been replaced with JVMTI, which does
not support method level code coverage. See my previous post for more
information.

Paul
"Mark Levison" <mlevison@gmail.com> wrote in message
news:fb9scq$j3j$1@build.eclipse.org...
> Mark Levison wrote:
>> We run our tests as "JUnit Plug-in Tests" so that we can access the
>> filesystem and things like Display. However as I go to do code coverage
>> work I struggling to make it work.
>
> Ok I figure the first part out - apparently my unstated goal of the day -
> make a fool of myself in public.
>
> Just for the record all I needed to do was open the Profile Dialog and it
> gave me all sort of options.
>
> Problem #2 I'm only seeing profile data for my test plugin not for the
> code under test. The code in the test plugin and primary plugin share the
> same name space (although the test plugin is not currently a fragment).
> Even though it should be necessary I've mucked around with the default
> filter to include all the possibly relevant code. Finally code from other
> plugins is covered. Is my problem merely that my test plugin isn't a
> fragment?
>
> Problem #3 Running under Java 1.5 I don't seem to have an option to
> generate code coverage - just Execution Time Analysis. When I go to the
> Profiling perspective I can't find any options to get coverage statistics.
>
> Cheers
> Mark Levison
Previous Topic:NoClassDefFoundError when running tests
Next Topic:[agr] failing to run in standard mode
Goto Forum:
  


Current Time: Sat Dec 07 01:06:04 GMT 2019

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

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

Back to the top