Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » relations between tested methods and test cases
relations between tested methods and test cases [message #132938] Fri, 18 July 2008 14:07 Go to next message
Eclipse UserFriend
Originally posted by: real.self.gmail.com

Hi,

With junit and line coverage in tptp, I can get the percentage of line
coverage for a class after executing a test suite. So for a method, I can
know if it is covered or not. If not, I can know which lines are not
covered.

For a method which is covered, can I know which test cases cover it? That
is, if a test case covers the method, are there some records saying this
and so I can use these records?

Thanks.

Jiangfan
Re: relations between tested methods and test cases [message #132955 is a reply to message #132938] Mon, 21 July 2008 12:13 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Jiangfan,
No, there is no direct way to determine the relationship between a
covered method/line and the code that invoked that method/line. That said,
you could determine this information at the method level by profiling the
SUT. At the line level, you could only determine this information by
debugging with breakpoints.

Note, the line level code coverage component in TPTP has been deprecated
in TPTP 4.4 and since removed in TPTP 4.5.

Paul
"jiangfan shi" <real.self@gmail.com> wrote in message
news:6818efa65b7882708d4e19d27384387f$1@www.eclipse.org...
> Hi,
> With junit and line coverage in tptp, I can get the percentage of line
> coverage for a class after executing a test suite. So for a method, I can
> know if it is covered or not. If not, I can know which lines are not
> covered.
> For a method which is covered, can I know which test cases cover it? That
> is, if a test case covers the method, are there some records saying this
> and so I can use these records?
> Thanks.
>
> Jiangfan
>
Re: relations between tested methods and test cases [message #132968 is a reply to message #132955] Mon, 21 July 2008 13:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: real.self.gmail.com

Hi, Paul,

Thanks for your precise reply. I have two associated questions.

1. "you could determine this information at the method level by profiling
the
SUT." From this idea, you mean I could profile the Junit execution of a
test suite to find which test case calls which method, am I right?

2."Note, the line level code coverage component in TPTP has been deprecated
in TPTP 4.4 and since removed in TPTP 4.5." So which code coverage
component will be used in TPTP 4.5 instead of using line level code
coverage component?

Thanks.

Best,

Jiangfan
Re: relations between tested methods and test cases [message #133007 is a reply to message #132968] Tue, 22 July 2008 10:25 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Jiangfan,
I have added some answers below:

Paul
"jiangfan shi" <real.self@gmail.com> wrote in message
news:8557c6dc58deef20745f0cc8339b9f93$1@www.eclipse.org...
> Hi, Paul,
>
> Thanks for your precise reply. I have two associated questions.
> 1. "you could determine this information at the method level by profiling
> the
> SUT." From this idea, you mean I could profile the Junit execution of a
> test suite to find which test case calls which method, am I right?

Yes, using the JVMPI Profiler in TPTP, you can analyze method execution:

http://help.eclipse.org/ganymede/topic/org.eclipse.tptp.plat form.doc.user/tasks/tpfviews.htm

> 2."Note, the line level code coverage component in TPTP has been
> deprecated
> in TPTP 4.4 and since removed in TPTP 4.5." So which code coverage
> component will be used in TPTP 4.5 instead of using line level code
> coverage component?

Unfortunately, we do not have the resources to provide a code coverage
solution. We have been suggesting to the community to use EMMA. Also, we
have tried using EMMA for our internal testing:

http://wiki.eclipse.org/How_to_test_TPTP_with_line_level_cod e_coverage_enabled

> Thanks.
> Best,
>
> Jiangfan
>
Re: relations between tested methods and test cases [message #133020 is a reply to message #133007] Tue, 22 July 2008 13:44 Go to previous message
Eclipse UserFriend
Originally posted by: real.self.gmail.com

Hi, Paul,

Thanks for this specific links, which help me a lot.

Best,

Jiangfan
Previous Topic:my test*.execution could not be edited
Next Topic:Configuring tptp agent to monitor on sun one application server
Goto Forum:
  


Current Time: Tue Apr 16 13:16:19 GMT 2024

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

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

Back to the top