Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Unit testing eclipse plugins
Unit testing eclipse plugins [message #92525] Wed, 14 February 2007 17:12 Go to next message
Anand Narasimhan is currently offline Anand NarasimhanFriend
Messages: 104
Registered: July 2009
Senior Member
Hi,

I don't know if this is the right forum to ask this question, but...
How can I use JUnit for testing eclipse plugins, especially extension
points.

I have an RCP application, for which I have defined a few extension
points. I want to test my extension point parsing code. Since extensions
are specified in the plugin.xml file and the junit project is not a
plugin project, how will junit read the plugin xml.

Any examples/samples or pointers to resources that describes this
process would be really helpful.

Thanks
Anand

--
____________________________________________________________ _________________________

Anand Narasimhan
anandn@cisco.com
Re: Unit testing eclipse plugins [message #92680 is a reply to message #92525] Sun, 18 February 2007 21:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.pl.ibm.com

Anand,

The best place to ask this question would be eclipse.platform unless
you're looking for the TPTP support for plug-in testing.

Standard PDE gives you ability to run your JUnit test cases in Plug-in
environment. Try "Run As->JUnit Plugin Test" - it lets you launch your
RCP headless and execute test cases, eg. access extension points, or
access workspace.

Jacek

Anand Narasimhan napisaƂ(a):
> Hi,
>
> I don't know if this is the right forum to ask this question, but...
> How can I use JUnit for testing eclipse plugins, especially extension
> points.
>
> I have an RCP application, for which I have defined a few extension
> points. I want to test my extension point parsing code. Since extensions
> are specified in the plugin.xml file and the junit project is not a
> plugin project, how will junit read the plugin xml.
>
> Any examples/samples or pointers to resources that describes this
> process would be really helpful.
>
> Thanks
> Anand
>
Re: Unit testing eclipse plugins [message #96081 is a reply to message #92680] Tue, 17 April 2007 11:15 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Anand,
TPTP provide analogous support for JUnit plug-in tests called the TPTP
JUnit Plug-in test. See
http://help.eclipse.org/help32/topic/org.eclipse.hyades.test .doc.user/concepts/cintro.htm
for more information.

From your JUnit plug-in test code, you can access the OSGi and PDE APIs
for accessing your plug-in's manifests and extensions/extension points.

Paul
"Jacek Pospychala" <jacek.pospychala@pl.ibm.com> wrote in message
news:erafua$1uk$1@utils.eclipse.org...
> Anand,
>
> The best place to ask this question would be eclipse.platform unless
> you're looking for the TPTP support for plug-in testing.
>
> Standard PDE gives you ability to run your JUnit test cases in Plug-in
> environment. Try "Run As->JUnit Plugin Test" - it lets you launch your RCP
> headless and execute test cases, eg. access extension points, or access
> workspace.
>
> Jacek
>
> Anand Narasimhan napisal(a):
>> Hi,
>>
>> I don't know if this is the right forum to ask this question, but...
>> How can I use JUnit for testing eclipse plugins, especially extension
>> points.
>>
>> I have an RCP application, for which I have defined a few extension
>> points. I want to test my extension point parsing code. Since extensions
>> are specified in the plugin.xml file and the junit project is not a
>> plugin project, how will junit read the plugin xml.
>>
>> Any examples/samples or pointers to resources that describes this process
>> would be really helpful.
>>
>> Thanks
>> Anand
>>
Previous Topic:Line Coverage for TPTP Unittests
Next Topic:testing outside eclipse
Goto Forum:
  


Current Time: Wed Aug 12 15:58:37 GMT 2020

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

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

Back to the top