Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Code Coverage Utility
Code Coverage Utility [message #88776] Mon, 27 November 2006 16:06 Go to next message
Eclipse UserFriend
Originally posted by: aheydarn.cs.uwaterloo.ca

Hi,



I have two questions about the TPTP's Code Coverage utility:



1) Is it possible to get code coverage information without using a
JUnit test case? For example, is it possible to simply run the program and
see which lines of the code are executed?



2) In the source code of the code coverage utility, what classes do the
actual profiling at the level of lines of code? How collected information by
the Probekit utility is translated to their corresponding lines of code?
What classes do this job?



Thank you so much in advance for your help,



--Abbas
Re: Code Coverage Utility [message #96981 is a reply to message #88776] Wed, 25 April 2007 11:50 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Abbas,
In TPTP, 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/help32/topic/org.eclipse.tptp.platfo rm.doc.user/tasks/tevwcode.htm

If you are interested in using the TPTP Method Level code coverage with
TPTP JUnit 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 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 >> Technology
Preview >> 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
"Abbas Heydarnoori" <aheydarn@cs.uwaterloo.ca> wrote in message
news:ekf2do$hpb$1@utils.eclipse.org...
> Hi,
>
>
>
> I have two questions about the TPTP's Code Coverage utility:
>
>
>
> 1) Is it possible to get code coverage information without using a
> JUnit test case? For example, is it possible to simply run the program and
> see which lines of the code are executed?
>
>
>
> 2) In the source code of the code coverage utility, what classes do
> the actual profiling at the level of lines of code? How collected
> information by the Probekit utility is translated to their corresponding
> lines of code? What classes do this job?
>
>
>
> Thank you so much in advance for your help,
>
>
>
> --Abbas
>
>
Re: Code Coverage Utility [message #96987 is a reply to message #96981] Wed, 25 April 2007 11:59 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Abbas,
Regarding question #2, the TPTP Line Level Code Coverage tool uses
Byte-code Insertion (BCI) to 'profile' target applications to determine code
coverage. In the org.eclipse.tptp.platform.llc.core plugin, see the
http://dev.eclipse.org/viewcvs/index.cgi/platform/org.eclips e.tptp.platform.llc.core/deploy/?root=TPTP_Project
folder for the deployment artifacts and the
http://dev.eclipse.org/viewcvs/index.cgi/platform/org.eclips e.tptp.platform.llc.core/src-native/?root=TPTP_Project
folder for the instrumentation artifacts.

The trace data is converted into a coverage report (see The
org.eclipse.tptp.platform.llc.core.report.RawReportReader.ja va) and
displayed in the UI (see
http://dev.eclipse.org/viewcvs/index.cgi/platform/org.eclips e.tptp.platform.llc.ui/?root=TPTP_Project).

Paul
"Paul Slauenwhite" <paules@ca.ibm.com> wrote in message
news:f0nfb8$ui7$1@build.eclipse.org...
> Hi Abbas,
> In TPTP, 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/help32/topic/org.eclipse.tptp.platfo rm.doc.user/tasks/tevwcode.htm
>
> If you are interested in using the TPTP Method Level code coverage with
> TPTP JUnit 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 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 >> Technology
> Preview >> 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
> "Abbas Heydarnoori" <aheydarn@cs.uwaterloo.ca> wrote in message
> news:ekf2do$hpb$1@utils.eclipse.org...
>> Hi,
>>
>>
>>
>> I have two questions about the TPTP's Code Coverage utility:
>>
>>
>>
>> 1) Is it possible to get code coverage information without using a
>> JUnit test case? For example, is it possible to simply run the program
>> and see which lines of the code are executed?
>>
>>
>>
>> 2) In the source code of the code coverage utility, what classes do
>> the actual profiling at the level of lines of code? How collected
>> information by the Probekit utility is translated to their corresponding
>> lines of code? What classes do this job?
>>
>>
>>
>> Thank you so much in advance for your help,
>>
>>
>>
>> --Abbas
>>
>>
>
>
Re: Code Coverage Utility [message #97034 is a reply to message #88776] Wed, 25 April 2007 20:42 Go to previous message
Valentina Popescu is currently offline Valentina PopescuFriend
Messages: 23
Registered: July 2009
Junior Member
Abbas,

For question 1)

Yes, you can collect line coverage information for any application you are
running. Although line coverage is useful when running testcases against the
code ( JUnit or other types ), this is only one of the scenarios.

To collect line coverage as you run an application :
- if the application is available within the workbech, select the Engage
Line Coverage toolbar button in the Package Explorer view, before running
the application
- if the application is running remotely or outside of the Eclipse
workspace, use the Profile > ( >>select your application type
configuration<<< ) and on the Monitor tab select the Line Coverage option

Valentina

"Abbas Heydarnoori" <aheydarn@cs.uwaterloo.ca> wrote in message
news:ekf2do$hpb$1@utils.eclipse.org...
> Hi,
>
>
>
> I have two questions about the TPTP's Code Coverage utility:
>
>
>
> 1) Is it possible to get code coverage information without using a
> JUnit test case? For example, is it possible to simply run the program and
> see which lines of the code are executed?
>
>
>
> 2) In the source code of the code coverage utility, what classes do
> the actual profiling at the level of lines of code? How collected
> information by the Probekit utility is translated to their corresponding
> lines of code? What classes do this job?
>
>
>
> Thank you so much in advance for your help,
>
>
>
> --Abbas
>
>
Previous Topic:Line Level Coverage runtime error
Next Topic:Manual Test Execution error
Goto Forum:
  


Current Time: Wed Apr 24 21:58:57 GMT 2024

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

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

Back to the top