Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » PDE Unit test
PDE Unit test [message #119751] Mon, 24 November 2003 03:14 Go to next message
Eclipse UserFriend
Originally posted by: dcorbin.machturtle.com

I know that there is support for running junit tests with a "plugin
framework". Can someone please point me at documentation, or a sample unit
test that leverages this?

Thanks.
Re: PDE Unit test [message #119828 is a reply to message #119751] Mon, 24 November 2003 06:33 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Have a look at the org.eclipse.ant.tests.core plugin and start with
org.eclipse.ant.tests.core.AutomatedSuite and the other test suites it adds
as tests.

HTH
Darins

"David Corbin" <dcorbin@machturtle.com> wrote in message
news:bprsu4$7mh$1@eclipse.org...
> I know that there is support for running junit tests with a "plugin
> framework". Can someone please point me at documentation, or a sample
unit
> test that leverages this?
>
> Thanks.
Re: PDE Unit test [message #122586 is a reply to message #119828] Wed, 26 November 2003 22:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcorbin.machturtle.com

OK, that helps a little. But quickly out of the gate I run into a problem.
I used a helper method in one of the other tests to create an JavaProject.
I call getAdapter(IProject.class) on this and get null. So, clearly
there's more stuff that needs to be initialized.

I'm kind of surpised not to find an "CoreTestCase" which initializes the
framework.

Obviously I'm doing something wrong, or I'm missing a concept still.

Darin Swanson wrote:

> Have a look at the org.eclipse.ant.tests.core plugin and start with
> org.eclipse.ant.tests.core.AutomatedSuite and the other test suites it
> adds as tests.
>
> HTH
> Darins
>
> "David Corbin" <dcorbin@machturtle.com> wrote in message
> news:bprsu4$7mh$1@eclipse.org...
>> I know that there is support for running junit tests with a "plugin
>> framework". Can someone please point me at documentation, or a sample
> unit
>> test that leverages this?
>>
>> Thanks.
Re: PDE Unit test [message #122594 is a reply to message #122586] Wed, 26 November 2003 22:22 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
So you have studied the ProjectCreationDecorator?

Darins

"David Corbin" <dcorbin@machturtle.com> wrote in message
news:bq37l4$e7j$1@eclipse.org...
> OK, that helps a little. But quickly out of the gate I run into a
problem.
> I used a helper method in one of the other tests to create an JavaProject.
> I call getAdapter(IProject.class) on this and get null. So, clearly
> there's more stuff that needs to be initialized.
>
> I'm kind of surpised not to find an "CoreTestCase" which initializes the
> framework.
>
> Obviously I'm doing something wrong, or I'm missing a concept still.
>
> Darin Swanson wrote:
>
> > Have a look at the org.eclipse.ant.tests.core plugin and start with
> > org.eclipse.ant.tests.core.AutomatedSuite and the other test suites it
> > adds as tests.
> >
> > HTH
> > Darins
> >
> > "David Corbin" <dcorbin@machturtle.com> wrote in message
> > news:bprsu4$7mh$1@eclipse.org...
> >> I know that there is support for running junit tests with a "plugin
> >> framework". Can someone please point me at documentation, or a sample
> > unit
> >> test that leverages this?
> >>
> >> Thanks.
>
Re: PDE Unit test [message #122618 is a reply to message #122594] Wed, 26 November 2003 23:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcorbin.machturtle.com

I've looked at it. And it shows a reasonable way to create necessary data
for a project. And it's helpful. And I've looked at some of the other test
plugins. But shouldn't

IJavaProject javaProject = createJavaProject();//assume this works
assertNotNull(javaProject.getAdapter(IProject.class));

pass?

Given that it doesn't (for me), it seems like something in the basic
platform is not being initialized.

Thanks
David

Darin Swanson wrote:

> So you have studied the ProjectCreationDecorator?
>
> Darins
>
> "David Corbin" <dcorbin@machturtle.com> wrote in message
> news:bq37l4$e7j$1@eclipse.org...
>> OK, that helps a little. But quickly out of the gate I run into a
> problem.
>> I used a helper method in one of the other tests to create an
>> JavaProject.
>> I call getAdapter(IProject.class) on this and get null. So, clearly
>> there's more stuff that needs to be initialized.
>>
>> I'm kind of surpised not to find an "CoreTestCase" which initializes the
>> framework.
>>
>> Obviously I'm doing something wrong, or I'm missing a concept still.
>>
>> Darin Swanson wrote:
>>
>> > Have a look at the org.eclipse.ant.tests.core plugin and start with
>> > org.eclipse.ant.tests.core.AutomatedSuite and the other test suites it
>> > adds as tests.
>> >
>> > HTH
>> > Darins
>> >
>> > "David Corbin" <dcorbin@machturtle.com> wrote in message
>> > news:bprsu4$7mh$1@eclipse.org...
>> >> I know that there is support for running junit tests with a "plugin
>> >> framework". Can someone please point me at documentation, or a sample
>> > unit
>> >> test that leverages this?
>> >>
>> >> Thanks.
>>
Re: PDE Unit test [message #122625 is a reply to message #122618] Thu, 27 November 2003 00:51 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Does javaProject.getProject() work?

Darins

"David Corbin" <dcorbin@machturtle.com> wrote in message
news:bq3ecs$koj$1@eclipse.org...
> I've looked at it. And it shows a reasonable way to create necessary data
> for a project. And it's helpful. And I've looked at some of the other
test
> plugins. But shouldn't
>
> IJavaProject javaProject = createJavaProject();//assume this works
> assertNotNull(javaProject.getAdapter(IProject.class));
>
> pass?
>
> Given that it doesn't (for me), it seems like something in the basic
> platform is not being initialized.
>
> Thanks
> David
>
> Darin Swanson wrote:
>
> > So you have studied the ProjectCreationDecorator?
> >
> > Darins
> >
> > "David Corbin" <dcorbin@machturtle.com> wrote in message
> > news:bq37l4$e7j$1@eclipse.org...
> >> OK, that helps a little. But quickly out of the gate I run into a
> > problem.
> >> I used a helper method in one of the other tests to create an
> >> JavaProject.
> >> I call getAdapter(IProject.class) on this and get null. So, clearly
> >> there's more stuff that needs to be initialized.
> >>
> >> I'm kind of surpised not to find an "CoreTestCase" which initializes
the
> >> framework.
> >>
> >> Obviously I'm doing something wrong, or I'm missing a concept still.
> >>
> >> Darin Swanson wrote:
> >>
> >> > Have a look at the org.eclipse.ant.tests.core plugin and start with
> >> > org.eclipse.ant.tests.core.AutomatedSuite and the other test suites
it
> >> > adds as tests.
> >> >
> >> > HTH
> >> > Darins
> >> >
> >> > "David Corbin" <dcorbin@machturtle.com> wrote in message
> >> > news:bprsu4$7mh$1@eclipse.org...
> >> >> I know that there is support for running junit tests with a "plugin
> >> >> framework". Can someone please point me at documentation, or a
sample
> >> > unit
> >> >> test that leverages this?
> >> >>
> >> >> Thanks.
> >>
>
Re: PDE Unit test [message #122709 is a reply to message #122625] Thu, 27 November 2003 15:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcorbin.machturtle.com

Yes, it works fine. I guess I was making a false assumption about
adaptability. (I didn't even realize there was a getProject method).

Now, there appears to be lot of useful Helper classes in various test
plugins. Can they be relied on by other plugins, or are they more like
..internals. packages? It seems a shame to rewrite so much code for
testing...

Darin Swanson wrote:

> Does javaProject.getProject() work?
>
> Darins
>
Re: PDE Unit test [message #129418 is a reply to message #122709] Tue, 23 December 2003 16:44 Go to previous messageGo to next message
Channing Walton is currently offline Channing WaltonFriend
Messages: 110
Registered: July 2009
Senior Member
David Corbin wrote:
> Now, there appears to be lot of useful Helper classes in various test
> plugins. Can they be relied on by other plugins, or are they more like
> .internals. packages? It seems a shame to rewrite so much code for
> testing...

Hi David, did you get an answer to this? I too would like to create unit
tests but rather not rely on code hobbled together from Eclipse tests
which may be difficult to keep up with.

Channing
Re: PDE Unit test [message #129770 is a reply to message #129418] Wed, 24 December 2003 17:24 Go to previous message
Eclipse UserFriend
Originally posted by: dcorbin.machturtle.com

Channing Walton wrote:

> David Corbin wrote:
>> Now, there appears to be lot of useful Helper classes in various test
>> plugins. Can they be relied on by other plugins, or are they more like
>> .internals. packages? It seems a shame to rewrite so much code for
>> testing...
>
> Hi David, did you get an answer to this? I too would like to create unit
> tests but rather not rely on code hobbled together from Eclipse tests
> which may be difficult to keep up with.
>
> Channing

No, I did not.
Previous Topic:Eclipse Update 3.0M2 -> 3.0M6
Next Topic:Problems with Eclipse working with code that is in clearcase
Goto Forum:
  


Current Time: Sat Oct 19 10:46:36 GMT 2024

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

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

Back to the top