Quantcast

what's an "Unrooted Test" and why can't I find anything online about it?

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

what's an "Unrooted Test" and why can't I find anything online about it?

Bradley, Todd (CW)
I'm using Eclipse 3.3 with JUnit 4.4.  In the olden days, with Eclipse
3.0 and JUnit 3.8, I could select a single test method in the Outline
view and run just that method.  Nowadays, whenever I try to do that,
Eclipse's test runner runs all the tests in the class.  The results are
shown in a tree, and the tests I didn't ask to be run are all under a
node called "Unrooted Tests [Runner: JUnit 4]".

So, I figured there must be some simple explanation, and immediately did
a Google search.  And it found nothing on topic.  So I searched the
Eclipse documentation and website for "unrooted tests" and again got
nothing.  So I searched on this Yahoo Group's message archive, and again
found nothing.

Am I the only person in the world who has ever had this problem with
running a single test method from Eclipse?  Or am I searching for the
web's most suppressed secret?

Someone please tell me you've seen this problem too!  And why is there
nothing written up about these mysterious "Unrooted Tests" in all the
places I looked?


Cheers,
Todd.
----
Todd Bradley - Polycom, Inc.
ReadiVideo QA Lead
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: what's an "Unrooted Test" and why can't I find anything online about it?

Bradley, Todd (CW)
Hi, does anyone have advice in this area?  Am we the only people using
JUnit 4.4 with Eclipse 3.3, or just the only ones who are having
problems with it?


Cheers,
Todd.

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Bradley, Todd
> Sent: Thursday, December 13, 2007 3:38 PM
> To: [hidden email]
> Subject: [junit] what's an "Unrooted Test" and why can't I
> find anything online about it?
>
> I'm using Eclipse 3.3 with JUnit 4.4.  In the olden days,
> with Eclipse 3.0 and JUnit 3.8, I could select a single test
> method in the Outline view and run just that method.  
> Nowadays, whenever I try to do that, Eclipse's test runner
> runs all the tests in the class.  The results are shown in a
> tree, and the tests I didn't ask to be run are all under a
> node called "Unrooted Tests [Runner: JUnit 4]".
>
> So, I figured there must be some simple explanation, and
> immediately did a Google search.  And it found nothing on
> topic.  So I searched the Eclipse documentation and website
> for "unrooted tests" and again got nothing.  So I searched on
> this Yahoo Group's message archive, and again found nothing.
>
> Am I the only person in the world who has ever had this
> problem with running a single test method from Eclipse?  Or
> am I searching for the web's most suppressed secret?
>
> Someone please tell me you've seen this problem too!  And why
> is there nothing written up about these mysterious "Unrooted
> Tests" in all the places I looked?
>
>
> Cheers,
> Todd.
> ----
> Todd Bradley - Polycom, Inc.
> ReadiVideo QA Lead
>
>
>  
> Yahoo! Groups Links
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: RE: what's an "Unrooted Test" and why can't I find anything online about it?

Per Jacobsson
I'm running Eclipse 3.3 and Junit 4.4. A single test in outline view works fine here.
/ Per

________________________________
From: [hidden email] [mailto:[hidden email]] On Behalf Of Bradley, Todd
Sent: Monday, December 17, 2007 3:00 PM
To: [hidden email]
Subject: RE: [junit] what's an "Unrooted Test" and why can't I find anything online about it?


Hi, does anyone have advice in this area? Am we the only people using
JUnit 4.4 with Eclipse 3.3, or just the only ones who are having
problems with it?

Cheers,
Todd.

> -----Original Message-----
> From: [hidden email]<mailto:junit%40yahoogroups.com> [mailto:[hidden email]<mailto:junit%40yahoogroups.com>] On
> Behalf Of Bradley, Todd
> Sent: Thursday, December 13, 2007 3:38 PM
> To: [hidden email]<mailto:junit%40yahoogroups.com>
> Subject: [junit] what's an "Unrooted Test" and why can't I
> find anything online about it?
>
> I'm using Eclipse 3.3 with JUnit 4.4. In the olden days,
> with Eclipse 3.0 and JUnit 3.8, I could select a single test
> method in the Outline view and run just that method.
> Nowadays, whenever I try to do that, Eclipse's test runner
> runs all the tests in the class. The results are shown in a
> tree, and the tests I didn't ask to be run are all under a
> node called "Unrooted Tests [Runner: JUnit 4]".
>
> So, I figured there must be some simple explanation, and
> immediately did a Google search. And it found nothing on
> topic. So I searched the Eclipse documentation and website
> for "unrooted tests" and again got nothing. So I searched on
> this Yahoo Group's message archive, and again found nothing.
>
> Am I the only person in the world who has ever had this
> problem with running a single test method from Eclipse? Or
> am I searching for the web's most suppressed secret?
>
> Someone please tell me you've seen this problem too! And why
> is there nothing written up about these mysterious "Unrooted
> Tests" in all the places I looked?
>
>
> Cheers,
> Todd.
> ----

.




[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about

edu_kumar
Hey Todd,

I too got the same issue, If I execute only one unit test case as
opposed to the whole class. It does shown me 'Unrooted Tests' in the
Junit output screen.

I tried investigating on this in net but found nothing about it. But i
did find similar (infact exact) issues in google code base.
Surprisingly, when I checked the same issue today it was removed.

I guess we've two options with us now..

1) Ask in the JUnit developer forums, the same question and wait for
the answer
2) Check in the code directly for any reference to 'Unrooted tests'.

Please let me know,if you find any updates on this issue...

Regards,
Sarat.

--- In [hidden email], Per Jacobsson <perjacobsson@...> wrote:
>
> I'm running Eclipse 3.3 and Junit 4.4. A single test in outline view
works fine here.
> / Per
>
> ________________________________
> From: [hidden email] [mailto:[hidden email]] On Behalf
Of Bradley, Todd
> Sent: Monday, December 17, 2007 3:00 PM
> To: [hidden email]
> Subject: RE: [junit] what's an "Unrooted Test" and why can't I find
anything online about it?

>
>
> Hi, does anyone have advice in this area? Am we the only people using
> JUnit 4.4 with Eclipse 3.3, or just the only ones who are having
> problems with it?
>
> Cheers,
> Todd.
>
> > -----Original Message-----
> > From: [hidden email]<mailto:junit%40yahoogroups.com>
[mailto:[hidden email]<mailto:junit%40yahoogroups.com>] On

> > Behalf Of Bradley, Todd
> > Sent: Thursday, December 13, 2007 3:38 PM
> > To: [hidden email]<mailto:junit%40yahoogroups.com>
> > Subject: [junit] what's an "Unrooted Test" and why can't I
> > find anything online about it?
> >
> > I'm using Eclipse 3.3 with JUnit 4.4. In the olden days,
> > with Eclipse 3.0 and JUnit 3.8, I could select a single test
> > method in the Outline view and run just that method.
> > Nowadays, whenever I try to do that, Eclipse's test runner
> > runs all the tests in the class. The results are shown in a
> > tree, and the tests I didn't ask to be run are all under a
> > node called "Unrooted Tests [Runner: JUnit 4]".
> >
> > So, I figured there must be some simple explanation, and
> > immediately did a Google search. And it found nothing on
> > topic. So I searched the Eclipse documentation and website
> > for "unrooted tests" and again got nothing. So I searched on
> > this Yahoo Group's message archive, and again found nothing.
> >
> > Am I the only person in the world who has ever had this
> > problem with running a single test method from Eclipse? Or
> > am I searching for the web's most suppressed secret?
> >
> > Someone please tell me you've seen this problem too! And why
> > is there nothing written up about these mysterious "Unrooted
> > Tests" in all the places I looked?
> >
> >
> > Cheers,
> > Todd.
> > ----
>
> .
>
>
>
>
> [Non-text portions of this message have been removed]
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: what's an "Unrooted Test" and why can't I find anything online about

Bradley, Todd (CW)
I had a few minutes to look into this over lunch today.  What I learned
is that when I had a test case that was a subclass of TestCase (to be
specific, my test case was a subclass of a subclass of TestCase), I had
the "Unrooted Test" problem.  When I made a test case in a new project
from scratch that didn't extend TestCase but only used @Test
annotations, Eclipse didn't run the unrooted tests.

When I get some more time, I want to dig into it more and try to figure
out why this is the case.  But I'm stuck in backlog estimation for the
next 3 days, and then it's Christmas.  So I may not have time to
investigate any more until the new year.


Todd.
 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
edu_kumar
Sent: Monday, December 17, 2007 7:44 PM
To: [hidden email]
Subject: Re: [junit] what's an "Unrooted Test" and why can't I find
anything online about

Hey Todd,

I too got the same issue, If I execute only one unit test case as
opposed to the whole class. It does shown me 'Unrooted Tests' in the
Junit output screen.

I tried investigating on this in net but found nothing about it. But i
did find similar (infact exact) issues in google code base.
Surprisingly, when I checked the same issue today it was removed.

I guess we've two options with us now..

1) Ask in the JUnit developer forums, the same question and wait for the
answer
2) Check in the code directly for any reference to 'Unrooted tests'.

Please let me know,if you find any updates on this issue...

Regards,
Sarat.

--- In [hidden email], Per Jacobsson <perjacobsson@...> wrote:
>
> I'm running Eclipse 3.3 and Junit 4.4. A single test in outline view
works fine here.
> / Per
>
> ________________________________
> From: [hidden email] [mailto:[hidden email]] On Behalf
Of Bradley, Todd
> Sent: Monday, December 17, 2007 3:00 PM
> To: [hidden email]
> Subject: RE: [junit] what's an "Unrooted Test" and why can't I find
anything online about it?

>
>
> Hi, does anyone have advice in this area? Am we the only people using
> JUnit 4.4 with Eclipse 3.3, or just the only ones who are having
> problems with it?
>
> Cheers,
> Todd.
>
> > -----Original Message-----
> > From: [hidden email]<mailto:junit%40yahoogroups.com>
[mailto:[hidden email]<mailto:junit%40yahoogroups.com>] On

> > Behalf Of Bradley, Todd
> > Sent: Thursday, December 13, 2007 3:38 PM
> > To: [hidden email]<mailto:junit%40yahoogroups.com>
> > Subject: [junit] what's an "Unrooted Test" and why can't I find
> > anything online about it?
> >
> > I'm using Eclipse 3.3 with JUnit 4.4. In the olden days, with
> > Eclipse 3.0 and JUnit 3.8, I could select a single test method in
> > the Outline view and run just that method.
> > Nowadays, whenever I try to do that, Eclipse's test runner runs all
> > the tests in the class. The results are shown in a tree, and the
> > tests I didn't ask to be run are all under a node called "Unrooted
> > Tests [Runner: JUnit 4]".
> >
> > So, I figured there must be some simple explanation, and immediately

> > did a Google search. And it found nothing on topic. So I searched
> > the Eclipse documentation and website for "unrooted tests" and again

> > got nothing. So I searched on this Yahoo Group's message archive,
> > and again found nothing.
> >
> > Am I the only person in the world who has ever had this problem with

> > running a single test method from Eclipse? Or am I searching for the

> > web's most suppressed secret?
> >
> > Someone please tell me you've seen this problem too! And why is
> > there nothing written up about these mysterious "Unrooted Tests" in
> > all the places I looked?
> >
> >
> > Cheers,
> > Todd.
> > ----
>
> .
>
>
>
>
> [Non-text portions of this message have been removed]
>




 
Yahoo! Groups Links



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about

dsaff
Todd,

Did the first class have a suite() method or @RunWith annotation?

   David Saff

On Dec 18, 2007 6:14 PM, Bradley, Todd <[hidden email]> wrote:

> I had a few minutes to look into this over lunch today.  What I learned
> is that when I had a test case that was a subclass of TestCase (to be
> specific, my test case was a subclass of a subclass of TestCase), I had
> the "Unrooted Test" problem.  When I made a test case in a new project
> from scratch that didn't extend TestCase but only used @Test
> annotations, Eclipse didn't run the unrooted tests.
>
> When I get some more time, I want to dig into it more and try to figure
> out why this is the case.  But I'm stuck in backlog estimation for the
> next 3 days, and then it's Christmas.  So I may not have time to
> investigate any more until the new year.
>
>
> Todd.
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of
> edu_kumar
> Sent: Monday, December 17, 2007 7:44 PM
> To: [hidden email]
>
> Subject: Re: [junit] what's an "Unrooted Test" and why can't I find
> anything online about
>
> Hey Todd,
>
> I too got the same issue, If I execute only one unit test case as
> opposed to the whole class. It does shown me 'Unrooted Tests' in the
> Junit output screen.
>
> I tried investigating on this in net but found nothing about it. But i
> did find similar (infact exact) issues in google code base.
> Surprisingly, when I checked the same issue today it was removed.
>
> I guess we've two options with us now..
>
> 1) Ask in the JUnit developer forums, the same question and wait for the
> answer
> 2) Check in the code directly for any reference to 'Unrooted tests'.
>
> Please let me know,if you find any updates on this issue...
>
> Regards,
> Sarat.
>
> --- In [hidden email], Per Jacobsson <perjacobsson@...> wrote:
> >
> > I'm running Eclipse 3.3 and Junit 4.4. A single test in outline view
> works fine here.
> > / Per
> >
> > ________________________________
> > From: [hidden email] [mailto:[hidden email]] On Behalf
> Of Bradley, Todd
> > Sent: Monday, December 17, 2007 3:00 PM
> > To: [hidden email]
> > Subject: RE: [junit] what's an "Unrooted Test" and why can't I find
> anything online about it?
> >
> >
> > Hi, does anyone have advice in this area? Am we the only people using
> > JUnit 4.4 with Eclipse 3.3, or just the only ones who are having
> > problems with it?
> >
> > Cheers,
> > Todd.
> >
> > > -----Original Message-----
> > > From: [hidden email]<mailto:junit%40yahoogroups.com>
> [mailto:[hidden email]<mailto:junit%40yahoogroups.com>] On
> > > Behalf Of Bradley, Todd
> > > Sent: Thursday, December 13, 2007 3:38 PM
> > > To: [hidden email]<mailto:junit%40yahoogroups.com>
> > > Subject: [junit] what's an "Unrooted Test" and why can't I find
> > > anything online about it?
> > >
> > > I'm using Eclipse 3.3 with JUnit 4.4. In the olden days, with
> > > Eclipse 3.0 and JUnit 3.8, I could select a single test method in
> > > the Outline view and run just that method.
> > > Nowadays, whenever I try to do that, Eclipse's test runner runs all
> > > the tests in the class. The results are shown in a tree, and the
> > > tests I didn't ask to be run are all under a node called "Unrooted
> > > Tests [Runner: JUnit 4]".
> > >
> > > So, I figured there must be some simple explanation, and immediately
>
> > > did a Google search. And it found nothing on topic. So I searched
> > > the Eclipse documentation and website for "unrooted tests" and again
>
> > > got nothing. So I searched on this Yahoo Group's message archive,
> > > and again found nothing.
> > >
> > > Am I the only person in the world who has ever had this problem with
>
> > > running a single test method from Eclipse? Or am I searching for the
>
> > > web's most suppressed secret?
> > >
> > > Someone please tell me you've seen this problem too! And why is
> > > there nothing written up about these mysterious "Unrooted Tests" in
> > > all the places I looked?
> > >
> > >
> > > Cheers,
> > > Todd.
> > > ----
> >
> > .
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about it?

yubi
In reply to this post by Bradley, Todd (CW)
Bradley, Todd wrote
I'm using Eclipse 3.3 with JUnit 4.4.  In the olden days, with Eclipse
3.0 and JUnit 3.8, I could select a single test method in the Outline
view and run just that method.  Nowadays, whenever I try to do that,
Eclipse's test runner runs all the tests in the class.  The results are
shown in a tree, and the tests I didn't ask to be run are all under a
node called "Unrooted Tests [Runner: JUnit 4]".

...

Cheers,
Todd.
----
Todd Bradley - Polycom, Inc.
ReadiVideo QA Lead
Well you are certainly not the only person getting this! We have upgraded to Junit 4.4 within our project and get the same issue. It makes debugging a real pain. If anyone finds a solution to this problem I would be obliged if you can pass it on!  BTW we are using MyEclipse 6.0.1.

Ayub Malik
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: what's an "Unrooted Test" and why can't I find anything online about it?

Bradley, Todd (CW)
> Well you are certainly not the only person getting this! We
> have upgraded to Junit 4.4 within our project and get the
> same issue. It makes debugging a real pain. If anyone finds a
> solution to this problem I would be obliged if you can pass
> it on!  BTW we are using MyEclipse 6.0.1.

Hi, Ayub.  How are your tests defined - the JUnit 3 way (by
inheriting from TestCase or a subclass of TestCase) or the
JUnit 4 way (by using the @org.junit.Test annotation)?


Todd.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: what's an "Unrooted Test" and why can't I find anything online about it?

yubi

Bradley, Todd wrote
> Well you are certainly not the only person getting this! We
> have upgraded to Junit 4.4 within our project and get the
> same issue. It makes debugging a real pain. If anyone finds a
> solution to this problem I would be obliged if you can pass
> it on!  BTW we are using MyEclipse 6.0.1.

Hi, Ayub.  How are your tests defined - the JUnit 3 way (by
inheriting from TestCase or a subclass of TestCase) or the
JUnit 4 way (by using the @org.junit.Test annotation)?


Todd.
We are using classes that extend TestCase. We cant use the new Junit4 annotations because we are dependant on code in the parent classes.

Ayub
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about it?

Joakim Ohlrogge
In reply to this post by yubi
This won't solve your problem but might shed some ligt on what an
unrooted test is (a weak comfort).

I have managed to cause unrooted tests earlier in my RSpec-JUnit
hack. Based on that experience an "unrooted test" is a test that is
run without having been declared previously by the runner (in my case
I had to fix my runner implementation that was, no doubt, not behaving
acording to spec). It would probably not hurt to ask this question in
an Eclipse forum aswell, it seems that exlipse single-test runner is
doing something that is not quite correct.

/J



On Jan 2, 2008 4:56 PM, yubi <[hidden email]> wrote:

>
>
>
>
>
>
>
>
>  Bradley, Todd wrote:
>  >
>  > I'm using Eclipse 3.3 with JUnit 4.4. In the olden days, with Eclipse
>  > 3.0 and JUnit 3.8, I could select a single test method in the Outline
>  > view and run just that method. Nowadays, whenever I try to do that,
>  > Eclipse's test runner runs all the tests in the class. The results are
>  > shown in a tree, and the tests I didn't ask to be run are all under a
>  > node called "Unrooted Tests [Runner: JUnit 4]".
>  >
>  > ...
>  >
>  > Cheers,
>  > Todd.
>  > ----
>  > Todd Bradley - Polycom, Inc.
>  > ReadiVideo QA Lead
>  >
>  >
>
>  Well you are certainly not the only person getting this! We have upgraded
> to
>  Junit 4.4 within our project and get the same issue. It makes debugging a
>  real pain. If anyone finds a solution to this problem I would be obliged if
>  you can pass it on! BTW we are using MyEclipse 6.0.1.
>
>  Ayub Malik
>  --
>  View this message in context:
> http://www.nabble.com/what%27s-an-%22Unrooted-Test%22-and-why-can%27t-I-find-anything-online-about-it--tp14326290p14578597.html
>  Sent from the JUnit - User mailing list archive at Nabble.com.
>
>  



--
-----------------------------------------------------
Joakim Ohlrogge
Agical AB
VÀsterlÄnggatan 79, 2 tr
111 29 Stockholm, SWEDEN

Mobile: +46-708-754004
Blog: johlrogge.wordpress.com
E-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: what's an "Unrooted Test" and why can't I find anything online about

Bradley, Todd (CW)
In reply to this post by Bradley, Todd (CW)
So, I just wanted to answer my own question, to close the loop on this
matter.  If you have a class that uses pure JUnit 4 style, then you can
run individual test methods without getting the "Unrooted Test" problem.
In other words, don't extend TestCase (or a subclass of TestCase).

In my own case, even though I thought I was using annotations to mark my
@Test methods, Eclipse was using the JUnit 3 compatibility mode.
Eclipse's test runner insisted to run all methods whose names start with
"test".

To follow up to a few other posts:

David Saff wrote:
> Did the first class have a suite() method or @RunWith annotation?

No.  Neither.  It doesn't seem to be related to test suites.


Ayub wrote:
> We are using classes that extend TestCase. We cant use the
> new Junit4 annotations because we are dependant on code in
> the parent classes.

We had the same issue.  However, we created a new parent class that has
all the useful code the old parent did, but doesn't inherit from
TestCase.  Now we're all switched over to doing things the new way,
which makes it easier to use Eclipse and JUnit together.

Joakim Ohlrogge wrote:
> I have managed to cause unrooted tests earlier in my
> RSpec-JUnit hack. Based on that experience an "unrooted test"
> is a test that is run without having been declared previously
> by the runner (in my case I had to fix my runner
> implementation that was, no doubt, not behaving acording to
> spec). It would probably not hurt to ask this question in an
> Eclipse forum aswell, it seems that exlipse single-test
> runner is doing something that is not quite correct.

I think you're right about the Eclipse test runner not being quite
correct.  But I'm not on any Eclipse forums, and I'm skeptical they
would fix the problem anyhow since it's been there for years without
(apparently) too many complaints.  Plus, the workaround of refactoring
our tests to use pure JUnit 4 is working, and is good enough for me.


Cheers,
Todd.






> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Bradley, Todd
> Sent: Tuesday, December 18, 2007 4:14 PM
> To: [hidden email]
> Subject: RE: [junit] what's an "Unrooted Test" and why can't
> I find anything online about
>
> I had a few minutes to look into this over lunch today.  What
> I learned is that when I had a test case that was a subclass
> of TestCase (to be specific, my test case was a subclass of a
> subclass of TestCase), I had the "Unrooted Test" problem.  
> When I made a test case in a new project from scratch that
> didn't extend TestCase but only used @Test annotations,
> Eclipse didn't run the unrooted tests.
>
> When I get some more time, I want to dig into it more and try
> to figure out why this is the case.  But I'm stuck in backlog
> estimation for the next 3 days, and then it's Christmas.  So
> I may not have time to investigate any more until the new year.
>
>
> Todd.
>  
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of edu_kumar
> Sent: Monday, December 17, 2007 7:44 PM
> To: [hidden email]
> Subject: Re: [junit] what's an "Unrooted Test" and why can't
> I find anything online about
>
> Hey Todd,
>
> I too got the same issue, If I execute only one unit test
> case as opposed to the whole class. It does shown me
> 'Unrooted Tests' in the Junit output screen.
>
> I tried investigating on this in net but found nothing about
> it. But i did find similar (infact exact) issues in google code base.
> Surprisingly, when I checked the same issue today it was removed.
>
> I guess we've two options with us now..
>
> 1) Ask in the JUnit developer forums, the same question and
> wait for the answer
> 2) Check in the code directly for any reference to 'Unrooted tests'.
>
> Please let me know,if you find any updates on this issue...
>
> Regards,
> Sarat.
>
> --- In [hidden email], Per Jacobsson <perjacobsson@...> wrote:
> >
> > I'm running Eclipse 3.3 and Junit 4.4. A single test in outline view
> works fine here.
> > / Per
> >
> > ________________________________
> > From: [hidden email] [mailto:[hidden email]] On Behalf
> Of Bradley, Todd
> > Sent: Monday, December 17, 2007 3:00 PM
> > To: [hidden email]
> > Subject: RE: [junit] what's an "Unrooted Test" and why can't I find
> anything online about it?
> >
> >
> > Hi, does anyone have advice in this area? Am we the only
> people using
> > JUnit 4.4 with Eclipse 3.3, or just the only ones who are having
> > problems with it?
> >
> > Cheers,
> > Todd.
> >
> > > -----Original Message-----
> > > From: [hidden email]<mailto:junit%40yahoogroups.com>
> [mailto:[hidden email]<mailto:junit%40yahoogroups.com>] On
> > > Behalf Of Bradley, Todd
> > > Sent: Thursday, December 13, 2007 3:38 PM
> > > To: [hidden email]<mailto:junit%40yahoogroups.com>
> > > Subject: [junit] what's an "Unrooted Test" and why can't I find
> > > anything online about it?
> > >
> > > I'm using Eclipse 3.3 with JUnit 4.4. In the olden days, with
> > > Eclipse 3.0 and JUnit 3.8, I could select a single test method in
> > > the Outline view and run just that method.
> > > Nowadays, whenever I try to do that, Eclipse's test
> runner runs all
> > > the tests in the class. The results are shown in a tree, and the
> > > tests I didn't ask to be run are all under a node called
> "Unrooted
> > > Tests [Runner: JUnit 4]".
> > >
> > > So, I figured there must be some simple explanation, and
> immediately
>
> > > did a Google search. And it found nothing on topic. So I searched
> > > the Eclipse documentation and website for "unrooted
> tests" and again
>
> > > got nothing. So I searched on this Yahoo Group's message archive,
> > > and again found nothing.
> > >
> > > Am I the only person in the world who has ever had this
> problem with
>
> > > running a single test method from Eclipse? Or am I
> searching for the
>
> > > web's most suppressed secret?
> > >
> > > Someone please tell me you've seen this problem too! And why is
> > > there nothing written up about these mysterious "Unrooted
> Tests" in
> > > all the places I looked?
> > >
> > >
> > > Cheers,
> > > Todd.
> > > ----
> >
> > .
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>  
> Yahoo! Groups Links
>
>
>
>
>
>  
> Yahoo! Groups Links
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: what's an "Unrooted Test" and why can't I find anything online about

bvkeirsb
In case somebody still has this problem (I ran into this as well - JUnit4, no use of TestCase at all).

If you extend a class and the supre class has a @BeforeClass method and and exception occures in the @BeforeClass method that isn't caught (or logged) you might get this 'Unrooted Test' error.

(Note: if you put a breakpoint in the @BeforeClass method and run your test in debug mode subsequent test runs will behave as expected (and also report on the thrown error.)

Hope it helps somebody out there...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about it?

boke
In reply to this post by Bradley, Todd (CW)
I see this problem randomly in E3.4 with JU4 tests.  The test have never been JU3 tests.  I have no idea why it starts happening, but I figured out a way to undo the mess.  

Whenever I have the problem, at least one test is rooted.  Once I identify that test, I go click in that test code and then rerun the tests again.  When I do this all the tests end up rooted and the problem goes away.  It works every time for me.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about it?

ngauba
In reply to this post by Bradley, Todd (CW)
hi

i ran into this issue using eclipse 3.4.2 with junit 4. I have one Junit class with 2 test methods. My junit class does not extend any class. I was able to select and run first test method but not the second one. When i run the second one i got this error saying unrooted test in the results. When i run the complete junit class it was running only the first method giving unrooted test for the second. I realized that my second test method was missing the annotation (@Test). as soon as i added that both the test were running fine.

-naveen


Bradley, Todd wrote
I'm using Eclipse 3.3 with JUnit 4.4.  In the olden days, with Eclipse
3.0 and JUnit 3.8, I could select a single test method in the Outline
view and run just that method.  Nowadays, whenever I try to do that,
Eclipse's test runner runs all the tests in the class.  The results are
shown in a tree, and the tests I didn't ask to be run are all under a
node called "Unrooted Tests [Runner: JUnit 4]".

So, I figured there must be some simple explanation, and immediately did
a Google search.  And it found nothing on topic.  So I searched the
Eclipse documentation and website for "unrooted tests" and again got
nothing.  So I searched on this Yahoo Group's message archive, and again
found nothing.

Am I the only person in the world who has ever had this problem with
running a single test method from Eclipse?  Or am I searching for the
web's most suppressed secret?

Someone please tell me you've seen this problem too!  And why is there
nothing written up about these mysterious "Unrooted Tests" in all the
places I looked?


Cheers,
Todd.
----
Todd Bradley - Polycom, Inc.
ReadiVideo QA Lead
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about it?

paulo brasko
In reply to this post by Bradley, Todd (CW)
One small thing that made it work for me was just include the line

"@Test"

as shown in the following example:

        // unit testing private methods in Matrix Class
        @Test
        public void testGetStructureSteps()
        {
                Element depletionSteps = null;
                Element expectedResult = null;
               
                try
                {
                     ...

when I did not had that "@Test" before I was getting the "unrooted tests" error message.
I hope this helps you.

Paulo Brasko





Bradley, Todd wrote
I'm using Eclipse 3.3 with JUnit 4.4.  In the olden days, with Eclipse
3.0 and JUnit 3.8, I could select a single test method in the Outline
view and run just that method.  Nowadays, whenever I try to do that,
Eclipse's test runner runs all the tests in the class.  The results are
shown in a tree, and the tests I didn't ask to be run are all under a
node called "Unrooted Tests [Runner: JUnit 4]".

So, I figured there must be some simple explanation, and immediately did
a Google search.  And it found nothing on topic.  So I searched the
Eclipse documentation and website for "unrooted tests" and again got
nothing.  So I searched on this Yahoo Group's message archive, and again
found nothing.

Am I the only person in the world who has ever had this problem with
running a single test method from Eclipse?  Or am I searching for the
web's most suppressed secret?

Someone please tell me you've seen this problem too!  And why is there
nothing written up about these mysterious "Unrooted Tests" in all the
places I looked?


Cheers,
Todd.
----
Todd Bradley - Polycom, Inc.
ReadiVideo QA Lead
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what's an "Unrooted Test" and why can't I find anything online about it?

anandkr
The reason for your test showing as unrooted test in Eclipse and JUnit 4 is:-

1) You may not have specified the annotation: @Test for your test method.
2) Your test method must be declared public.
3) Make sure in Eclipse you project is building properly. You should idealy select "Build Automatically" from Project menu.
4) If above does not help then clean and rebuild your project manually.

hope this helps.


paulo brasko wrote
One small thing that made it work for me was just include the line

"@Test"

as shown in the following example:

        // unit testing private methods in Matrix Class
        @Test
        public void testGetStructureSteps()
        {
                Element depletionSteps = null;
                Element expectedResult = null;
               
                try
                {
                     ...

when I did not had that "@Test" before I was getting the "unrooted tests" error message.
I hope this helps you.

Paulo Brasko





Bradley, Todd wrote
I'm using Eclipse 3.3 with JUnit 4.4.  In the olden days, with Eclipse
3.0 and JUnit 3.8, I could select a single test method in the Outline
view and run just that method.  Nowadays, whenever I try to do that,
Eclipse's test runner runs all the tests in the class.  The results are
shown in a tree, and the tests I didn't ask to be run are all under a
node called "Unrooted Tests [Runner: JUnit 4]".

So, I figured there must be some simple explanation, and immediately did
a Google search.  And it found nothing on topic.  So I searched the
Eclipse documentation and website for "unrooted tests" and again got
nothing.  So I searched on this Yahoo Group's message archive, and again
found nothing.

Am I the only person in the world who has ever had this problem with
running a single test method from Eclipse?  Or am I searching for the
web's most suppressed secret?

Someone please tell me you've seen this problem too!  And why is there
nothing written up about these mysterious "Unrooted Tests" in all the
places I looked?


Cheers,
Todd.
----
Todd Bradley - Polycom, Inc.
ReadiVideo QA Lead
Loading...