Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

junit · JUnit, the Java unit testing framework written by Kent Beck and Erich Gamma.

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 31224
  • Category: Java
  • Founded: Nov 6, 2000
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 23850 - 23879 of 24384   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#23850 From: "Georg" <le_garcon_enerve@...>
Date: Mon Apr 23, 2012 12:09 pm
Subject: Re: Best practices to keep scenarios outside of the unit test
le_garcon_en...
Send Email Send Email
 
Hi!

Alternativly, use getData methods in CSVParametrized form the unofficialjunit
project in sourceforge.

Cheers,
  Georg

--- In junit@yahoogroups.com, Dawid Weiss <dawid.weiss@...> wrote:
>
> Parameterized test runner is probably what you're after. The default one in
> JUnit does not support naming parameters (several folks provided patches,
> they're in github). I wrote a different runner and that one provides named
> parameters and static factory methods for test -- see an example of use
> here:
>
> http://goo.gl/aFRWL
>
> Dawid
>
>
> [Non-text portions of this message have been removed]
>

#23851 From: David Saff <saff@...>
Date: Mon Apr 23, 2012 6:41 pm
Subject: Re: The order of default builders.
saffatgoogle
Send Email Send Email
 
Dawid,

Imagine a developer being dropped into a new project.  There are JUnit
tests using custom runners she's never seen, and some of those are failing.
  She'd like to Ignore some of the failing test classes, and focus in on a
couple to fix first.  I think that there's value in being able to trust
@Ignore to always Just Work, even if the custom runners being used are
faulty in various ways.

So the current functionality stays.

I can definitely understand wanting to attach a suite listener, though, so
if you're interested in pursuing contribution of that code, let me know.
  Thanks,

    David

On Sat, Apr 21, 2012 at 3:31 AM, Dawid Weiss <dawid.weiss@...> wrote:

> **
>
>
> Thanks. Yes, I could do this, like I did with other things (for example I
> support meta-annotation @TestGroup which allows one to define custom
> annotations like @Nightly, @Slow, etc. and disable/enable them as a group).
> This works much like an auto-assumption; you can see the test results from
> Apache Lucene here (grep for @Nightly or @AwaitsFix to see group-ignored
> tests):
>
>
> https://builds.apache.org/job/Lucene-Solr-tests-only-trunk/13341/consoleText
>
> But then... @Ignore works great and is well defined (and most importantly
> users already know what it does). The only unexpected thing (to me) is that
> on-class @Ignore doesn't even attempt to retrieve the descriptions tree.
>
> Don't get me wrong -- I do understand the design rationale for having
> on-class @Ignore served by another runner, but at the same I just disagree
> that it is a right decision. I think there should be something like a
> "certification test" for Runner implementations and the contract on passing
> on-class @Ignore should be that it doesn't execute any test (run count ==
> zero). The number of ignored tests should be up to the Runner (either
> ignore the suite or each test separately).
>
> Dawid
>
> On Sat, Apr 21, 2012 at 12:33 AM, Kevin Cooney <kcooney@...> wrote:
>
> > **
>
> >
> >
> > Not a perfect solution, but you could add your own custom annotation for
> > this purpose. Your custom runner would check if the target class has this
> > annotation, and if so, return child runners that do nothing but the
> > reporting.
> >
> > -- Kevin
> >
> >
> > On Wed, Apr 18, 2012 at 3:54 PM, Dawid Weiss <dawid.weiss@...>
> > wrote:
> >
> > > **
> > >
> > >
> > > This would be Situation 2. I have a custom runner (not descending from
> > > JUnit) specifically to target things like reporting (that is -- I would
> > > like to know which tests were ignored if a suite is ignored, not just
> > skip
> > > them silently). This is possible if somebody explicitly creates my
> runner
> > > with a suite class but not via factory (JUnitCore or Request) because
> > then
> > > Ignore takes precedence over RunWith.
> > >
> > > Dawid
> > >
> > > On Wed, Apr 18, 2012 at 8:24 PM, David Saff <saff@...> wrote:
> > >
> > > > **
> >
> > >
> > > >
> > > >
> > > > Dawid,
> > > >
> > > > Which of these situations are you targeting?
> > > >
> > > > Situation 1:
> > > >
> > > > @RunWith(MyCustomSuite.class)
> > > > @SuiteClasses({A.class, B.class, ...})
> > > > public class Suite { ... }
> > > >
> > > > @Ignore
> > > > public class A { ... }
> > > >
> > > > Situation 2:
> > > >
> > > > @Ignore
> > > > @RunWith(MyCustomRunner.class)
> > > > public class A { ... }
> > > >
> > > > Thanks,
> > > >
> > > > David Saff
> > > >
> > > > On Wed, Apr 18, 2012 at 4:19 AM, Dawid Weiss <dawid.weiss@...>
> > > > wrote:
> > > >
> > > > > **
> > > >
> > > > >
> > > > >
> > > > > Hi everyone,
> > > > >
> > > > > So, AllDefaultPossibilitiesBuilder has ignoredBuilder() before
> > > > > annotated builder as shown here:
> > > > >
> > > > > @Override
> > > > > public Runner runnerForClass(Class<?> testClass) throws Throwable {
> > > > > List<RunnerBuilder> builders= Arrays.asList(
> > > > > ignoredBuilder(),
> > > > > annotatedBuilder(),
> > > > > ...
> > > > >
> > > > > I understand this was done to enforce consistent handling of
> @Ignore
> > > > > at class level but it sucks if you want to have a custom runner
> that
> > > > > wishes to handle @Ignore on class in a different manner. In
> > > > > particular, I'm looking to report the descriptions of all ignored
> > unit
> > > > > tests (rather than just skipping the entire class).
> > > > >
> > > > > Changing the order above will most likely break annotated runners
> > that
> > > > > are not prepared to handle class-level @Ignore. Any other
> > suggestions/
> > > > > options how this could be solved? This could be a tweak to
> > > > > IgnoredBuilder to delegate to a sub-runner if it sees @RunWith and
> > > > > then just fire ignore events for each individual test?
> > > > >
> > > > > Dawid
> > > > >
> > > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > > >
> > > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>


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

#23852 From: Dawid Weiss <dawid.weiss@...>
Date: Mon Apr 23, 2012 7:43 pm
Subject: Re: The order of default builders.
dawid.weiss@...
Send Email Send Email
 
>
> Imagine a developer being dropped into a new project. There are JUnit
> tests using custom runners she's never seen, and some of those are failing.
> She'd like to Ignore some of the failing test classes, and focus in on a
> couple to fix first. I think that there's value in being able to trust
> @Ignore to always Just Work, even if the custom runners being used are
> faulty in various ways.
>

Like I mentioned I can understand this rationale but I still differ in
opinion. If there are custom runners that fail to comply with @Ignore
contract they are badly broken, that's all. Whether to cater for badly
broken code that should fulfill contracts is a philosophical question.

> So the current functionality stays.
>
I accept this decision even if I don't like the consequences.

>  I can definitely understand wanting to attach a suite listener, though, so
> if you're interested in pursuing contribution of that code, let me know.
>

Sorry for being slow but how could this help me? And how would this be
different from attaching a listener to JUnitCore? Recall I would like to
retrieve a tree of Descriptions from a suite class annotated with an
@Ignore annotation.

Dawid


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

#23853 From: David Saff <saff@...>
Date: Mon Apr 23, 2012 8:08 pm
Subject: Re: The order of default builders.
saffatgoogle
Send Email Send Email
 
On Mon, Apr 23, 2012 at 3:43 PM, Dawid Weiss <dawid.weiss@...> wrote:

> **
>
>
> >
> > Imagine a developer being dropped into a new project. There are JUnit
> > tests using custom runners she's never seen, and some of those are
> failing.
> > She'd like to Ignore some of the failing test classes, and focus in on a
> > couple to fix first. I think that there's value in being able to trust
> > @Ignore to always Just Work, even if the custom runners being used are
> > faulty in various ways.
> >
>
> Like I mentioned I can understand this rationale but I still differ in
> opinion. If there are custom runners that fail to comply with @Ignore
> contract they are badly broken, that's all. Whether to cater for badly
> broken code that should fulfill contracts is a philosophical question.
>
>
> > So the current functionality stays.
> >
> I accept this decision even if I don't like the consequences.
>
>
> > I can definitely understand wanting to attach a suite listener, though,
> so
> > if you're interested in pursuing contribution of that code, let me know.
> >
>
> Sorry for being slow but how could this help me? And how would this be
> different from attaching a listener to JUnitCore? Recall I would like to
> retrieve a tree of Descriptions from a suite class annotated with an
> @Ignore annotation.
>

Ah, I'd forgotten that you wanted a description of all the contents.  Does
your scheme allow you to use a RunnerBuilder other than the default
AllDefaultPossibilitiesBuilder?

    David Saff


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


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

#23854 From: Dawid Weiss <dawid.weiss@...>
Date: Mon Apr 23, 2012 8:28 pm
Subject: Re: The order of default builders.
dawid.weiss@...
Send Email Send Email
 
> Ah, I'd forgotten that you wanted a description of all the contents. Does
> your scheme allow you to use a RunnerBuilder other than the default
> AllDefaultPossibilitiesBuilder?
>
>
See, that's the problem -- I have no control over what the use case of
invoking the suite class is. It can be invoked from Ant, Eclipse or
somewhere else. I think most use cases are JUnitCore.runClass but I cannot
rule out using Request or other combinations -- hard to tell, really. I
wouldn't be asking for it but aside from the Runner implementation I also
have a custom Ant task (to run tests in parallel JVMs among other features)
and for this it'd be very nice to be able to list all ignored tests,
including those from ignored suites. If not for anything else, you can then
sum up how many individual test cases you have in your project... Currently
what is available to a RunListener when @Ignore is invoked on a suite is 0
executed tests, 0 ignored tests, 0 failed tests - I think this is odd.

I also agree with Cedric that the reason for an ignored test (or
assumption-ignored test) is an important thing to have available in
listeners. This is particularly itching with RunListeners because test
ignored callback doesn't provide any means of passing a cause (unlike an
assumption). This can be worked around using some trickery -- and I do that
in randomizedtesting package -- but again -- it's an API constraint that is
hard to overcome.

Dawid


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

#23855 From: David Saff <saff@...>
Date: Mon Apr 23, 2012 8:53 pm
Subject: Re: The order of default builders.
saffatgoogle
Send Email Send Email
 
So, with an extra suite-wrapping step, you can use whatever ordering of
builders you want:

@RunWith(MyCustomBuiltSuite.class)
@SuiteClasses({TheActualSuiteICareAbout.class})
public class MySuite{}

public MyCustomBuiltSuite extends Suite {
    public MyCustomBuiltSuite(Class<?> klass, RunnerBuilder builder) {
      super(klass, new MyCustomRunnerBuilder());
    }
}

If you find that your extension with that workaround step is getting some
major use, let's talk about how to make life easier for all those users,
but this should be enough to bootstrap, no?

    David Saff

On Mon, Apr 23, 2012 at 4:28 PM, Dawid Weiss <dawid.weiss@...> wrote:

> **
>
>
> > Ah, I'd forgotten that you wanted a description of all the contents. Does
> > your scheme allow you to use a RunnerBuilder other than the default
> > AllDefaultPossibilitiesBuilder?
> >
> >
> See, that's the problem -- I have no control over what the use case of
> invoking the suite class is. It can be invoked from Ant, Eclipse or
> somewhere else. I think most use cases are JUnitCore.runClass but I cannot
> rule out using Request or other combinations -- hard to tell, really. I
> wouldn't be asking for it but aside from the Runner implementation I also
> have a custom Ant task (to run tests in parallel JVMs among other features)
> and for this it'd be very nice to be able to list all ignored tests,
> including those from ignored suites. If not for anything else, you can then
> sum up how many individual test cases you have in your project... Currently
> what is available to a RunListener when @Ignore is invoked on a suite is 0
> executed tests, 0 ignored tests, 0 failed tests - I think this is odd.
>
> I also agree with Cedric that the reason for an ignored test (or
> assumption-ignored test) is an important thing to have available in
> listeners. This is particularly itching with RunListeners because test
> ignored callback doesn't provide any means of passing a cause (unlike an
> assumption). This can be worked around using some trickery -- and I do that
> in randomizedtesting package -- but again -- it's an API constraint that is
> hard to overcome.
>
>
> Dawid
>
> [Non-text portions of this message have been removed]
>
>
>


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

#23856 From: Dawid Weiss <dawid.weiss@...>
Date: Mon Apr 23, 2012 9:14 pm
Subject: Re: The order of default builders.
dawid.weiss@...
Send Email Send Email
 
>
> So, with an extra suite-wrapping step, you can use whatever ordering of
> builders you want:
>
> @RunWith(MyCustomBuiltSuite.class)
> @SuiteClasses({TheActualSuiteICareAbout.class})
> public class MySuite{}
>
> Nice trick, thanks. But I can't really tell Lucene folks to use this --
they get upset at every spurious keystroke (even at the @Test annotation).

That's fine, thanks for trying to help, David. I'll just live with this
behavior of @Ignore.

Dawid


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

#23857 From: "Patricia" <patricia_e_miguel@...>
Date: Wed Apr 25, 2012 9:56 pm
Subject: Not sure if JUnit can be used how I need it... suggestions?
patricia_e_m...
Send Email Send Email
 
Hi :)
I'm working on a project for university, which is about a website to teach the
basics of Java programming.
It'll have some programming lessons and then some exercises for the user to
practise by typing them in a textbox that will then send its contents to a
servlet. The servlet will compile the code (creating a .class file) and return
some results (success or compiling errors).
So far so good. But I'd also like to test that the user created an appropriate
solution to the excercise, and I was thinking of doing so with JUnit.
My problem is I can't think of a way to do it (I've never used JUnit before).
Any ideas?

Thanks!!

Patricia.

#23858 From: Malte Finsterwalder <malte@...>
Date: Thu Apr 26, 2012 7:17 am
Subject: Re: Not sure if JUnit can be used how I need it... suggestions?
maltefinster...
Send Email Send Email
 
That's a very general question.

JUnit does not do much more than execute a bunch of tests and give you
assertions to test.
(It does give you some more "fancy" tricks, like Rules and Runners as an addon.)

As long as you can write some test code that executes the not yet
written class/method in a reliable way, I think it should be possible.

Greetings,
    Malte

#23859 From: "yaswanth" <yaswanthbs@...>
Date: Thu Apr 26, 2012 5:51 am
Subject: Parameterized method
spartonking478
Send Email Send Email
 
Hi All,

I am new to junit. I am confused how to run the parameterized method.

Ex:

@Test
public void add(int a,int b){
System.out.println("Result = "+(a+b));
}

Thanks
SaiYaswanth

#23860 From: David M <jokerdm@...>
Date: Thu Apr 26, 2012 2:28 pm
Subject: Re: Parameterized method
jokerdmgmail
Send Email Send Email
 
"Must" read this:

http://www.mkyong.com/unittest/junit-4-tutorial-6-parameterized-test/

It´s a good and simple explain by example.

Greetings

--

M.P.7.O.


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

#23861 From: Colin Vipurs <zodiaczx6@...>
Date: Thu Apr 26, 2012 2:18 pm
Subject: Re: Parameterized method
zodiac_zx6
Send Email Send Email
 
You need to use the ParameterizedTestRunner.

Here's a blog on how to do that:

https://blogs.oracle.com/jacobc/entry/parameterized_unit_tests_with_junit

On Thu, Apr 26, 2012 at 6:51 AM, yaswanth <yaswanthbs@...> wrote:

> **
>
>
> Hi All,
>
> I am new to junit. I am confused how to run the parameterized method.
>
> Ex:
>
> @Test
> public void add(int a,int b){
> System.out.println("Result = "+(a+b));
> }
>
> Thanks
> SaiYaswanth
>
>
>



--
Maybe she awoke to see the roommate's boyfriend swinging from the
chandelier wearing a boar's head.

Something which you, I, and everyone else would call "Tuesday", of course.


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

#23862 From: "Pete" <tenorsaxman11@...>
Date: Thu Apr 26, 2012 9:03 pm
Subject: How can I check if a test failed during @After?
tenorsaxman11
Send Email Send Email
 
I need to have Selenium Webdriver take a screenshot if the test failed, prior to
closing the driver during teardown.

Various attempts I've read about have not been successful (for example, @After
is called and the driver destroyed prior to TestWatcher's failed()
interception).  The cleanest way to do this would simply be to check during my
@After tearDown() if the test failed.

I've looked at the TestResult class and it's not clear if I could use that.

Thanks for any help.
pete

#23863 From: "Michael" <mfeher00@...>
Date: Thu Apr 26, 2012 8:13 pm
Subject: Basic JUnit question(s)
mfeher00
Send Email Send Email
 
Hi all,

Please bear with me as I'm getting back into JUnit after first using it several
years ago.  I see all the discussions going on and they are far beyond what I
conceive that I have use for at the moment.

Presently, I'm developing part of a simulation system in Java for work, and I
plan on using JUnit as part of NetBeans to do unit testing to bulletproof my
code.  My question is, as I understand it, I can write a class and then
"right-click to generate JUnit test class" or something.  So what happens when I
update my real class with additional fixes and/or functionality?  Does NB/JU
know to automatically update the test class, or do I have to regen the test
class?

Thanks for your time,
Mike

#23864 From: Dawid Weiss <dawid.weiss@...>
Date: Thu Apr 26, 2012 10:00 pm
Subject: Re: How can I check if a test failed during @After?
dawid.weiss@...
Send Email Send Email
 
A simpler way would be to use a test rule and check if the test throws an
exception (excluding assumption exceptions). This is an example rule that
implements this:

http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TestWatcher.html

Dawid

On Thu, Apr 26, 2012 at 11:03 PM, Pete <tenorsaxman11@...> wrote:

> **
>
>
> I need to have Selenium Webdriver take a screenshot if the test failed,
> prior to closing the driver during teardown.
>
> Various attempts I've read about have not been successful (for example,
> @After is called and the driver destroyed prior to TestWatcher's failed()
> interception). The cleanest way to do this would simply be to check during
> my @After tearDown() if the test failed.
>
> I've looked at the TestResult class and it's not clear if I could use that.
>
> Thanks for any help.
> pete
>
>
>


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

#23865 From: Tomek Kaczanowski <kaczanowski.tomek@...>
Date: Thu Apr 26, 2012 10:03 pm
Subject: Re: Basic JUnit question(s)
kaczanowski.tomek@...
Send Email Send Email
 
Michael,

I know this is not exactly what you are asking about, but please bear in
mind that generation of test skeleton based on the class which already
exists is not the best way to achieve high-quality test code. I do not say
it is evil (like kicking small puppies), just be careful with it. :)  Such
approach steers you towards testing of class methods, which is fine, but
testing of class responsibilities is what you goal should really be! The
difference is (sometimes) subtle, but important in the long run.

P.S. However, if you are starting (or renewing) your friendship with JUnit,
then it might be a good start.

--
Regards / Pozdrawiam
Tomek Kaczanowski
http://practicalunittesting.com

W dniu 26 kwietnia 2012 22:13 użytkownik Michael <mfeher00@...>napisał:

> **
>
>
> Hi all,
>
> Please bear with me as I'm getting back into JUnit after first using it
> several years ago. I see all the discussions going on and they are far
> beyond what I conceive that I have use for at the moment.
>
> Presently, I'm developing part of a simulation system in Java for work,
> and I plan on using JUnit as part of NetBeans to do unit testing to
> bulletproof my code. My question is, as I understand it, I can write a
> class and then "right-click to generate JUnit test class" or something. So
> what happens when I update my real class with additional fixes and/or
> functionality? Does NB/JU know to automatically update the test class, or
> do I have to regen the test class?
>
> Thanks for your time,
> Mike
>
>
>


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

#23866 From: "Pete" <tenorsaxman11@...>
Date: Thu Apr 26, 2012 11:15 pm
Subject: Re: How can I check if a test failed during @After?
tenorsaxman11
Send Email Send Email
 
Thank you Dawid, however as I already mentioned in my question, TestWatcher
methods are invoked after @After methods.

pete



--- In junit@yahoogroups.com, Dawid Weiss <dawid.weiss@...> wrote:
>
> A simpler way would be to use a test rule and check if the test throws an
> exception (excluding assumption exceptions). This is an example rule that
> implements this:
>
>
http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TestWatcher.html
>
> Dawid
>
> On Thu, Apr 26, 2012 at 11:03 PM, Pete <tenorsaxman11@...> wrote:
>
> > **
> >
> >
> > I need to have Selenium Webdriver take a screenshot if the test failed,
> > prior to closing the driver during teardown.
> >
> > Various attempts I've read about have not been successful (for example,
> > @After is called and the driver destroyed prior to TestWatcher's failed()
> > interception). The cleanest way to do this would simply be to check during
> > my @After tearDown() if the test failed.
> >
> > I've looked at the TestResult class and it's not clear if I could use that.
> >
> > Thanks for any help.
> > pete
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>

#23867 From: Dawid Weiss <dawid.weiss@...>
Date: Fri Apr 27, 2012 5:48 am
Subject: Re: Re: How can I check if a test failed during @After?
dawid.weiss@...
Send Email Send Email
 
You need to declare TestWatcher rule as a @ClassRule.

Dawid

On Fri, Apr 27, 2012 at 1:15 AM, Pete <tenorsaxman11@...> wrote:

> **
>
>
> Thank you Dawid, however as I already mentioned in my question,
> TestWatcher methods are invoked after @After methods.
>
> pete
>
>
> --- In junit@yahoogroups.com, Dawid Weiss <dawid.weiss@...> wrote:
> >
> > A simpler way would be to use a test rule and check if the test throws an
> > exception (excluding assumption exceptions). This is an example rule that
> > implements this:
> >
> >
>
http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TestWatcher.html
> >
> > Dawid
> >
> > On Thu, Apr 26, 2012 at 11:03 PM, Pete <tenorsaxman11@...> wrote:
> >
> > > **
>
> > >
> > >
> > > I need to have Selenium Webdriver take a screenshot if the test failed,
> > > prior to closing the driver during teardown.
> > >
> > > Various attempts I've read about have not been successful (for example,
> > > @After is called and the driver destroyed prior to TestWatcher's
> failed()
> > > interception). The cleanest way to do this would simply be to check
> during
> > > my @After tearDown() if the test failed.
> > >
> > > I've looked at the TestResult class and it's not clear if I could use
> that.
> > >
> > > Thanks for any help.
> > > pete
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


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

#23868 From: Dawid Weiss <dawid.weiss@...>
Date: Fri Apr 27, 2012 5:50 am
Subject: Re: Re: How can I check if a test failed during @After?
dawid.weiss@...
Send Email Send Email
 
Sorry, completely lost the thread here.

My intention was that you replace whatever you want to do in your @After
hooks and put it in the rule instead (TestWatcher or your own, custom one).
This way you have full control over the execution of your tests and their
output.

So code from @After -> @Rule body.

Dawid

On Fri, Apr 27, 2012 at 7:48 AM, Dawid Weiss <dawid.weiss@...> wrote:

>
> You need to declare TestWatcher rule as a @ClassRule.
>
> Dawid
>
>
> On Fri, Apr 27, 2012 at 1:15 AM, Pete <tenorsaxman11@...> wrote:
>
>> **
>>
>>
>> Thank you Dawid, however as I already mentioned in my question,
>> TestWatcher methods are invoked after @After methods.
>>
>> pete
>>
>>
>> --- In junit@yahoogroups.com, Dawid Weiss <dawid.weiss@...> wrote:
>> >
>> > A simpler way would be to use a test rule and check if the test throws
>> an
>> > exception (excluding assumption exceptions). This is an example rule
>> that
>> > implements this:
>> >
>> >
>>
http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TestWatcher.html
>> >
>> > Dawid
>> >
>> > On Thu, Apr 26, 2012 at 11:03 PM, Pete <tenorsaxman11@...> wrote:
>> >
>> > > **
>>
>> > >
>> > >
>> > > I need to have Selenium Webdriver take a screenshot if the test
>> failed,
>> > > prior to closing the driver during teardown.
>> > >
>> > > Various attempts I've read about have not been successful (for
>> example,
>> > > @After is called and the driver destroyed prior to TestWatcher's
>> failed()
>> > > interception). The cleanest way to do this would simply be to check
>> during
>> > > my @After tearDown() if the test failed.
>> > >
>> > > I've looked at the TestResult class and it's not clear if I could use
>> that.
>> > >
>> > > Thanks for any help.
>> > > pete
>> > >
>> > >
>> > >
>> >
>> >
>> > [Non-text portions of this message have been removed]
>> >
>>
>>
>>
>
>


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

#23869 From: Malte Finsterwalder <malte@...>
Date: Fri Apr 27, 2012 8:24 am
Subject: Re: Basic JUnit question(s)
maltefinster...
Send Email Send Email
 
My answer is simple:
Don't generate test stubs through IDE magic.
It does not really help and potentially leads you down the wrong track.

Writing good unit tests is a skill, that can't be automated.

Greetings,
    Malte

#23870 From: "barbara_a_bennett" <barbara.bennett@...>
Date: Fri Apr 27, 2012 3:32 pm
Subject: parameterized test with multiple test methods
barbara_a_be...
Send Email Send Email
 
Is the parameterized test class intended to have only one test method?

I have created parameterized test classes with multiple test methods that use
the same parameters with apparent success. However, when I tried it with a new
test class yesterday JUnit didn't behave in the expected way. This is in RAD
8.0.4 using JUnit 4.8.1.

The assertEquals in the second test method is reported as a failure even though
the method being tested returned the correct results (I traced through with
debug to verify). JUnit appended the result from the first test method to the
result from the second test method and reported the second method as a failure
because the combined result didn't match the expected result.

Am I using the parameterized test incorrectly by having multiple test methods or
is there a bug in JUnit?

#23871 From: David Saff <saff@...>
Date: Fri Apr 27, 2012 8:50 pm
Subject: Re: parameterized test with multiple test methods
saffatgoogle
Send Email Send Email
 
Hmm, that's odd.  Not expected behavior.

Were any of your parameters mutable types, such that if a value were shared
between multiple invocations, it could have been modified from one
invocation, with effects seen in the next?

Any chance you could share at least a skeleton of your test case?   Thanks,

    David Saff

On Fri, Apr 27, 2012 at 11:32 AM, barbara_a_bennett <barbara.bennett@...
> wrote:

> **
>
>
> Is the parameterized test class intended to have only one test method?
>
> I have created parameterized test classes with multiple test methods that
> use the same parameters with apparent success. However, when I tried it
> with a new test class yesterday JUnit didn't behave in the expected way.
> This is in RAD 8.0.4 using JUnit 4.8.1.
>
> The assertEquals in the second test method is reported as a failure even
> though the method being tested returned the correct results (I traced
> through with debug to verify). JUnit appended the result from the first
> test method to the result from the second test method and reported the
> second method as a failure because the combined result didn't match the
> expected result.
>
> Am I using the parameterized test incorrectly by having multiple test
> methods or is there a bug in JUnit?
>
>
>


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

#23872 From: "Pete" <tenorsaxman11@...>
Date: Fri Apr 27, 2012 5:42 pm
Subject: Re: How can I check if a test failed during @After?
tenorsaxman11
Send Email Send Email
 
That is a great idea.  Sometimes you just need someone else's perspective -- not
sure why that didn't occur to me before.  Thanks Dawid!


--- In junit@yahoogroups.com, Dawid Weiss <dawid.weiss@...> wrote:
>
> Sorry, completely lost the thread here.
>
> My intention was that you replace whatever you want to do in your @After
> hooks and put it in the rule instead (TestWatcher or your own, custom one).
> This way you have full control over the execution of your tests and their
> output.
>
> So code from @After -> @Rule body.
>
> Dawid
>
> On Fri, Apr 27, 2012 at 7:48 AM, Dawid Weiss <dawid.weiss@...> wrote:
>
> >
> > You need to declare TestWatcher rule as a @ClassRule.
> >
> > Dawid
> >
> >
> > On Fri, Apr 27, 2012 at 1:15 AM, Pete <tenorsaxman11@...> wrote:
> >
> >> **
> >>
> >>
> >> Thank you Dawid, however as I already mentioned in my question,
> >> TestWatcher methods are invoked after @After methods.
> >>
> >> pete
> >>
> >>
> >> --- In junit@yahoogroups.com, Dawid Weiss <dawid.weiss@> wrote:
> >> >
> >> > A simpler way would be to use a test rule and check if the test throws
> >> an
> >> > exception (excluding assumption exceptions). This is an example rule
> >> that
> >> > implements this:
> >> >
> >> >
> >>
http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TestWatcher.html
> >> >
> >> > Dawid
> >> >
> >> > On Thu, Apr 26, 2012 at 11:03 PM, Pete <tenorsaxman11@> wrote:
> >> >
> >> > > **
> >>
> >> > >
> >> > >
> >> > > I need to have Selenium Webdriver take a screenshot if the test
> >> failed,
> >> > > prior to closing the driver during teardown.
> >> > >
> >> > > Various attempts I've read about have not been successful (for
> >> example,
> >> > > @After is called and the driver destroyed prior to TestWatcher's
> >> failed()
> >> > > interception). The cleanest way to do this would simply be to check
> >> during
> >> > > my @After tearDown() if the test failed.
> >> > >
> >> > > I've looked at the TestResult class and it's not clear if I could use
> >> that.
> >> > >
> >> > > Thanks for any help.
> >> > > pete
> >> > >
> >> > >
> >> > >
> >> >
> >> >
> >> > [Non-text portions of this message have been removed]
> >> >
> >>
> >>
> >>
> >
> >
>
>
> [Non-text portions of this message have been removed]
>

#23873 From: "." <tesco@...>
Date: Sat Apr 28, 2012 2:19 pm
Subject: Testing of OSGi declarative services
tesco@...
Send Email Send Email
 
Hi,

I'm not able to test a OSGi declarative service with a JUnit Plugin Test
in Eclipse.

Although all necessary bundles (especially the Service, the Consumer
with the JUnit Test class, org.eclipse.equinox.ds,
org.eclipse.equinox.util, org.eclipse.jdt.junit.runtime and
org.eclipse.pde.junit.runtime) are added to the Run Configuration of the
Plugin Test and the bind/unbind methods are defined in the test class it
comes to an Null Pointer Exception (the bind method seems to be not
executed), if I access the Service attribute (e.g. public static
IMyService myService) in a JUnit Test method.

According to this site
http://stackoverflow.com/questions/7161338/using-osgi-declarative-services-in-th\
e-context-of-a-junit-test
the reason for this exception is that the OSGi framework is in a race
condition with the JUnit tests runner context. The solution there to use
a Count Down Latch that waits in a @Before method until the needed
service (that should be tested) is binded, seems to be not working for
me. In my case the await() method blocks infinitely, so the test will be
never executed. On the other hand, if I define a maximum time to wait,
e.g. await(10, TimeUnit.SECONDS), it comes after this time again to the
Null Pointer Exception.

What is the correct way to test a OSGi declarative service with JUnit?

Any help is appreciated.

Regards,
Rene

#23874 From: "barbara_a_bennett" <barbara.bennett@...>
Date: Mon Apr 30, 2012 8:49 pm
Subject: Re: parameterized test with multiple test methods
barbara_a_be...
Send Email Send Email
 
Maybe it is a case of me having bad expectations. I assumed that each of the
tests would get the parameters as they are defined in the parameter section, not
after they've been modified by a previous test method. I'm used to the 3.8
"every test starts out fresh" idea. That isn't happening. One of the parameters
is "new StringBuilder()". I expected both methods to get an empty StringBuilder.
But, the second method is getting the StringBuilder with the contents added in
the first method.

I tried resetting it in an @After method just to see what happens. The code to
set it to a new StringBuilder is executed but the second test method still gets
the StringBuilder with the contents added by the first method.

Is this the expected behavior?

--- In junit@yahoogroups.com, David Saff <saff@...> wrote:
>
> Hmm, that's odd.  Not expected behavior.
>
> Were any of your parameters mutable types, such that if a value were shared
> between multiple invocations, it could have been modified from one
> invocation, with effects seen in the next?
>
> Any chance you could share at least a skeleton of your test case?   Thanks,
>
>    David Saff
>
> On Fri, Apr 27, 2012 at 11:32 AM, barbara_a_bennett <barbara.bennett@...
> > wrote:
>
> > **
> >
> >
> > Is the parameterized test class intended to have only one test method?
> >
> > I have created parameterized test classes with multiple test methods that
> > use the same parameters with apparent success. However, when I tried it
> > with a new test class yesterday JUnit didn't behave in the expected way.
> > This is in RAD 8.0.4 using JUnit 4.8.1.
> >
> > The assertEquals in the second test method is reported as a failure even
> > though the method being tested returned the correct results (I traced
> > through with debug to verify). JUnit appended the result from the first
> > test method to the result from the second test method and reported the
> > second method as a failure because the combined result didn't match the
> > expected result.
> >
> > Am I using the parameterized test incorrectly by having multiple test
> > methods or is there a bug in JUnit?
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>

#23875 From: "tekmonk2005" <tekmonk2005@...>
Date: Mon Apr 30, 2012 8:31 pm
Subject: tomcat deps on ant which deps on junit ... BUILD FAILED
tekmonk2005
Send Email Send Email
 
~
  While trying to install tomcat-7.0.27 it tells me install ant, wich tells me to
install junit and then you get:
~
BUILD FAILED
/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:191: The
following error occurred while executing this line:
/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:179: Java
returned: 1
  at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
...
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
~
  Has anyone dealt with those issues?
~
  lbrtchx
~
$ git clone https://github.com/KentBeck/junit.git >
"/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/REF/junit.git_"$_DT".inst_\
build.log" 2>&1
$ cd junit
$ ant -verbose dist

BUILD FAILED
/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:191: The
following error occurred while executing this line:
/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:179: Java
returned: 1
  at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:390)
  at org.apache.tools.ant.Target.performTasks(Target.java:411)
  at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
  at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:\
41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
  at org.apache.tools.ant.Main.runBuild(Main.java:809)
  at org.apache.tools.ant.Main.startAnt(Main.java:217)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 25 seconds

#23876 From: Marc Philipp <mphilipp82@...>
Date: Tue May 1, 2012 5:47 am
Subject: Re: tomcat deps on ant which deps on junit ... BUILD FAILED
mphilipp1982
Send Email Send Email
 
In line 179 of build.xml a java task is executed in order to run the AllTests
suite. I'm not too familiar with Ant but this does not look like a JUnit issue.

Regards, Marc


Am 30.04.2012 um 22:31 schrieb tekmonk2005:

> ~
> While trying to install tomcat-7.0.27 it tells me install ant, wich tells me
to install junit and then you get:
> ~
> BUILD FAILED
> /media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:191: The
following error occurred while executing this line:
> /media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:179: Java
returned: 1
> at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
> ...
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> ~
> Has anyone dealt with those issues?
> ~
> lbrtchx
> ~
> $ git clone https://github.com/KentBeck/junit.git >
"/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/REF/junit.git_"$_DT".inst_\
build.log" 2>&1
> $ cd junit
> $ ant -verbose dist
>
> BUILD FAILED
> /media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:191: The
following error occurred while executing this line:
> /media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:179: Java
returned: 1
> at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:390)
> at org.apache.tools.ant.Target.performTasks(Target.java:411)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
> at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:\
41)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
> at org.apache.tools.ant.Main.runBuild(Main.java:809)
> at org.apache.tools.ant.Main.startAnt(Main.java:217)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
>
> Total time: 25 seconds
>
>

#23877 From: "tekmonk2005" <tekmonk2005@...>
Date: Tue May 1, 2012 1:54 am
Subject: Re: tomcat deps on ant which deps on junit ... BUILD FAILED
tekmonk2005
Send Email Send Email
 
~
  I really don't know how to make sense of this, but ant does not appear to like
symbolic links ...
~
  lbrtchx
~
$ ls -l /usr/bin/ant
lrwxrwxrwx 1 root root 20 Sep 13  2011 /usr/bin/ant -> ../share/ant/bin/ant

$ ls -lH /usr/bin/ant
-rwxr-xr-x 1 root root 9903 May 19  2011 /usr/bin/ant

$ ls -l /usr/share/ant/bin/ant
-rwxr-xr-x 1 root root 9903 May 19  2011 /usr/share/ant/bin/ant

$ ANT_HOME=/usr/share/ant
$ export PATH=$ANT_HOME/bin:$PATH

$ ant -verbose -debug -Dtests.haltonfailure=false dist
Apache Ant(TM) version 1.8.3 compiled on April 30 2012
Trying the default build file: build.xml
Buildfile: /media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml
...
      [java] JUnit version 4.11-SNAPSHOT
      [java]
................................................................................\
................................................................................\
................................................................................\
.................................................................I.I............\
................................................................................\
................................................................................\
...............I................................................................\
.........................................
      [java] Time: 5.796
      [java]
      [java] OK (598 tests)
      [java]

BUILD SUCCESSFUL
Total time: 24 seconds

#23878 From: "tekmonk2005" <tekmonk2005@...>
Date: Tue May 1, 2012 1:42 am
Subject: Re: tomcat deps on ant which deps on junit ... BUILD FAILED
tekmonk2005
Send Email Send Email
 
and this error is reported as a fixed bug
~
  https://issues.apache.org/bugzilla/show_bug.cgi?id=45028
~
  lbrtchx

#23879 From: "tekmonk2005" <tekmonk2005@...>
Date: Tue May 1, 2012 12:54 am
Subject: Re: tomcat deps on ant which deps on junit ... BUILD FAILED
tekmonk2005
Send Email Send Email
 
Actually the complete failure trace is:

dist:
      [java] Executing
'/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/jdk/jdk1.7.0_04/jre/bin/java'
with arguments:
      [java] '-Dignore.this=ignored'
      [java] '-classpath'
      [java]
'/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/junit4.11-SNAPSHOT:/\
media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/junit4.11-SNAPSHOT/jun\
it-4.11-SNAPSHOT.jar'
      [java] 'org.junit.runner.JUnitCore'
      [java] 'org.junit.tests.AllTests'
      [java]
      [java] The ' characters around the executable and arguments are
      [java] not part of the command.
Execute:Java13CommandLauncher: Executing
'/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/jdk/jdk1.7.0_04/jre/bin/java'
with arguments:
'-Dignore.this=ignored'
'-classpath'
'/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/junit4.11-SNAPSHOT:/\
media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/junit4.11-SNAPSHOT/jun\
it-4.11-SNAPSHOT.jar'
'org.junit.runner.JUnitCore'
'org.junit.tests.AllTests'

The ' characters around the executable and arguments are
not part of the command.
      [java] JUnit version 4.11-SNAPSHOT
      [java]
................................................................................\
................................................................................\
................................................................................\
.................................................................I.I............\
................................................................................\
................................................................................\
...............I................................................................\
.....................................E....
      [java] Time: 5.69
      [java] There was 1 failure:
      [java] 1) testNameAsc(org.junit.internal.MethodSorterTest)
      [java] org.junit.ComparisonFailure: expected:<...(), void epsilon(), [int
gamma(), void gamma(boolean])]> but was:<...(), void epsilon(), [void
gamma(boolean), int gamma(])]>
      [java]  at org.junit.Assert.assertEquals(Assert.java:125)
      [java]  at org.junit.Assert.assertEquals(Assert.java:147)
      [java]  at
org.junit.internal.MethodSorterTest.testNameAsc(MethodSorterTest.java:93)
      [java]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java]  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [java]  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
      [java]  at java.lang.reflect.Method.invoke(Method.java:601)
      [java]  at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java\
:45)
      [java]  at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:\
15)
      [java]  at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:4\
2)
      [java]  at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20\
)
      [java]  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:269)
      [java]  at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69\
)
      [java]  at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48\
)
      [java]  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:237)
      [java]  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:61)
      [java]  at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:235)
      [java]  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:51)
      [java]  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:228)
      [java]  at org.junit.runners.ParentRunner.run(ParentRunner.java:306)
      [java]  at org.junit.runners.Suite.runChild(Suite.java:128)
      [java]  at org.junit.runners.Suite.runChild(Suite.java:24)
      [java]  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:237)
      [java]  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:61)
      [java]  at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:235)
      [java]  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:51)
      [java]  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:228)
      [java]  at org.junit.runners.ParentRunner.run(ParentRunner.java:306)
      [java]  at org.junit.runners.Suite.runChild(Suite.java:128)
      [java]  at org.junit.runners.Suite.runChild(Suite.java:24)
      [java]  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:237)
      [java]  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:61)
      [java]  at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:235)
      [java]  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:51)
      [java]  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:228)
      [java]  at org.junit.runners.ParentRunner.run(ParentRunner.java:306)
      [java]  at org.junit.runner.JUnitCore.run(JUnitCore.java:151)
      [java]  at org.junit.runner.JUnitCore.run(JUnitCore.java:130)
      [java]  at org.junit.runner.JUnitCore.run(JUnitCore.java:111)
      [java]  at org.junit.runner.JUnitCore.runMain(JUnitCore.java:92)
      [java]  at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:47)
      [java]  at org.junit.runner.JUnitCore.main(JUnitCore.java:38)
      [java]
      [java] FAILURES!!!
      [java] Tests run: 598,  Failures: 1
      [java]

BUILD FAILED
/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:191: The
following error occurred while executing this line:
/media/sdb1/prjx/sw/jwebXBL/java_baseline/srcs/junit/junit/build.xml:179: Java
returned: 1
	 at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
	 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
	 at java.lang.reflect.Method.invoke(Method.java:601)
	 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	 at org.apache.tools.ant.Task.perform(Task.java:348)
	 at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
	 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
	 at java.lang.reflect.Method.invoke(Method.java:601)
	 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	 at org.apache.tools.ant.Task.perform(Task.java:348)
	 at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
	 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav\
a:43)
	 at java.lang.reflect.Method.invoke(Method.java:601)
	 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	 at org.apache.tools.ant.Task.perform(Task.java:348)
	 at org.apache.tools.ant.Target.execute(Target.java:390)
	 at org.apache.tools.ant.Target.performTasks(Target.java:411)
	 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	 at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	 at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:\
41)
	 at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	 at org.apache.tools.ant.Main.runBuild(Main.java:809)
	 at org.apache.tools.ant.Main.startAnt(Main.java:217)
	 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
	 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 25 seconds

Messages 23850 - 23879 of 24384   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help