Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Using API tooling to search for test cases
Using API tooling to search for test cases [message #523322] Thu, 25 March 2010 21:34 Go to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi,

quite often when encountering a bug in some Eclipse class I wanted to search for all uses
of this class to find test cases which cover the class. I learned at EclipseCon that such
searches might be executed using the API tooling. I found this mentioned on the wiki (
http://wiki.eclipse.org/PDE/API_Tools/Use_Cases#API_Usage_Re porting_.28Batch_Mode.29 ,
http://wiki.eclipse.org/PDE/Plan/3.6#API_Use_Scans ) but found no documentation / howto.
Did I miss anything here? Is there an easy way to find all usages of some class in all
Eclipse code and locate test code for classes/methods this way?

Greetings,

Ralf

--
http://www.ralfebert.de/blog/eclipsercp/
Re: Using API tooling to search for test cases [message #525435 is a reply to message #523322] Tue, 06 April 2010 15:03 Go to previous messageGo to next message
Michael Rennie is currently offline Michael RennieFriend
Messages: 67
Registered: July 2009
Location: Canada
Member
Trying to find all the usage of particular Java member in your workspace, it might be better to use the JDT command for finding all references in your workspace.

To use the API tooling to extract references please start with the wiki here: http://wiki.eclipse.org/PDE/API_Tools/Resources, which gives a pretty good howto for using the UI and the Ant tasks
Re: Using API tooling to search for test cases [message #525660 is a reply to message #525435] Wed, 07 April 2010 07:20 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi Michael,

> Trying to find all the usage of particular Java member in your
> workspace, it might be better to use the JDT command for finding all
> references in your workspace.

the problem is that I'm trying to find something that is not in my workspace or target
platform yet - I'm just trying to find the project I want to check out :) I'm looking for
a way to go from a class like "org.eclipse.swt.Button" to the unit tests that use this
class, without having all the plug-ins that have unit test classes in my workspace. I'm
just trying to make contributing to Eclipse easier and "provide an easy way to find
existing tests" was one of my ideas that I'm investigating.

> To use the API tooling to extract references please start with the wiki
> here: http://wiki.eclipse.org/PDE/API_Tools/Resources, which gives a
> pretty good howto for using the UI and the Ant tasks

thanks for the starting point; but I was looking more for a way to search existing
metadata about references in all the Eclipse projects (like an pre-calculated index which
class uses which other class, or even full-text search would be a good start), not for a
way to generate reports. I guess API Tooling doesn't provide such an index; I'll try to
set this up for an existing project and see what I can get from it...

Greetings,

Ralf


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Using API tooling to search for test cases [message #525662 is a reply to message #525660] Wed, 07 April 2010 12:21 Go to previous messageGo to next message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Also just found

Bug 162160 - Add the ability to search code
https://bugs.eclipse.org/bugs/show_bug.cgi?id=162160

which might provide a solution for the problem as well.


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Using API tooling to search for test cases [message #543572 is a reply to message #525662] Tue, 29 June 2010 20:11 Go to previous message
Businge Missing name is currently offline Businge Missing nameFriend
Messages: 8
Registered: April 2010
Junior Member
Hi Ralf,

Did you succeed in solving your problem? I still have a similar problem like yours. If you did please guide me.

Thank you

John.

Re: Using API tooling to search for test cases [message #605471 is a reply to message #523322] Tue, 06 April 2010 15:03 Go to previous message
Michael Rennie is currently offline Michael RennieFriend
Messages: 67
Registered: July 2009
Location: Canada
Member
Trying to find all the usage of particular Java member in your workspace, it might be better to use the JDT command for finding all references in your workspace.

To use the API tooling to extract references please start with the wiki here: http://wiki.eclipse.org/PDE/API_Tools/Resources, which gives a pretty good howto for using the UI and the Ant tasks
Re: Using API tooling to search for test cases [message #605505 is a reply to message #525435] Wed, 07 April 2010 12:08 Go to previous message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Hi Michael,

> Trying to find all the usage of particular Java member in your
> workspace, it might be better to use the JDT command for finding all
> references in your workspace.

the problem is that I'm trying to find something that is not in my workspace or target
platform yet - I'm just trying to find the project I want to check out :) I'm looking for
a way to go from a class like "org.eclipse.swt.Button" to the unit tests that use this
class, without having all the plug-ins that have unit test classes in my workspace. I'm
just trying to make contributing to Eclipse easier and "provide an easy way to find
existing tests" was one of my ideas that I'm investigating.

> To use the API tooling to extract references please start with the wiki
> here: http://wiki.eclipse.org/PDE/API_Tools/Resources, which gives a
> pretty good howto for using the UI and the Ant tasks

thanks for the starting point; but I was looking more for a way to search existing
metadata about references in all the Eclipse projects (like an pre-calculated index which
class uses which other class, or even full-text search would be a good start), not for a
way to generate reports. I guess API Tooling doesn't provide such an index; I'll try to
set this up for an existing project and see what I can get from it...

Greetings,

Ralf


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Using API tooling to search for test cases [message #605511 is a reply to message #605505] Wed, 07 April 2010 12:21 Go to previous message
Ralf Ebert is currently offline Ralf EbertFriend
Messages: 168
Registered: July 2009
Senior Member
Also just found

Bug 162160 - Add the ability to search code
https://bugs.eclipse.org/bugs/show_bug.cgi?id=162160

which might provide a solution for the problem as well.


--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
Re: Using API tooling to search for test cases [message #606210 is a reply to message #525662] Tue, 29 June 2010 20:11 Go to previous message
Businge Missing name is currently offline Businge Missing nameFriend
Messages: 8
Registered: April 2010
Junior Member
Hi Ralf,

Did you succeed in solving your problem? I still have a similar problem like yours. If you did please guide me.

Thank you

John.
Previous Topic:Problem launching Eclipse product
Next Topic:External jars for plugins
Goto Forum:
  


Current Time: Thu Apr 25 01:16:30 GMT 2024

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

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

Back to the top