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...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 23792 - 23821 of 24384   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#23792 From: kristian@...
Date: Thu Jan 5, 2012 11:42 am
Subject: Re: Runner for maven
krosenvold
Send Email Send Email
 
Surefire is maven's default test-runner. It serves a bucketload of use-cases,
some of which are *far* off from what I'd do in my own tests. If the user
decides to use loggers or system out is not really something we want to dictate.

As a humoristic example, let me mention the issue we had on this guy spawning
threads from a test that were producing console output for the entire test run
that was collected by a JVM shutdown hook.

Kristian


--- In junit@yahoogroups.com, "Georg" <le_garcon_enerve@...> wrote:
>
> Dear Kristian,
>
> My first thought - and I hope not to sound arrogant - would be to
>  - to remove the the output altogether (who reads it anyhow once the test is
run successfully the first time ;-); if one needs to read the output of the test
runs, what's the point of unit tests?!).
>  - or to convert it into assertions (they also work nicely in methods not
marked with @Test).
>
> If you still think you need the output, why not use a logger (log4j), which
adds all the information you need? Refactoring should be very easy.
>
> As I'm starting to learn and play with AspectJ, I'd try that (but would not
bet money on this being a good idea). This would allow to intercept calls to
System.out.print() and alike, and tweak it print the argument(s) of the
print()-statement augmented with the class to which the calling method belongs.
>
>
>
>
> --- In junit@yahoogroups.com, kristian@ wrote:
> >
> > Sorry, I was doing just what I sometimes dislike of our own users ;)
> >
> > The real problem I want to solve is associating console output from a
running thread to a given test-case (for parallel runs). We have this fairly
well covered already and we manage to capture everything that happens within a
given test-case for that test-case.
> >
> > The real problem is that the RunListener API does not demarcate test-classes
properly, so I am unable to distinguish console output happening in @AfterClass
of one test with @BeforeClass on the test-class on the same thread.
> >
> > This problem has been in the corner of my eye for quite some time and I've
been trying to find a decent angle to solve it from. I promise not to do
anything that is frowned upon, which is why I asked ;)
> >
> > Kristian
> >
> >
> > --- In junit@yahoogroups.com, Matthew Farwell <matthew@> wrote:
> > >
> > > Kristian,
> > >
> > > In reading your original mail, I was also confused as to what you wanted
to
> > > achieve. Could you expand a little please?
> > >
> > > Thanks.
> > >
> > > Matthew Farwell.
> > >
> > > Le 3 janvier 2012 22:45, hkaipe <hkaipe@> a écrit :
> > >
> > > > **
> > > >
> > > > Hi Kristian
> > > >
> > > > Do you really want a transition from RunListener?
> > > >
> > > > To an outside observer - a JUnit Runner "describes" its test-executions
> > > > and reports their outcome to the RunNotifier, which forward the info to
> > > > RunListener, which is the interface that 3rd-party test-running
> > > > applications (e.g. IDEs, Maven-Surefire etc) are expected to use.
> > > >
> > > > I have seen IDE-project test-extensions try to go beyond
> > > > RunListener/RunNotifier and start to joggle with Runner internals (e.g.
> > > > test-instance creation/setup, method-executions etc) and the result is
> > > > something I don't like much. It works for simple cases but with
customized
> > > > Runner-classes and new JUnit-features (e.g. the introduction of
> > > > JUnit-Rules) the result is usually bad and it discourages the IDE users
> > > > (i.e. the developers) from taking full advantage of JUnit!
> > > >
> > > > However, Maven (versions 2.0-2.2) and its Surefire-plugin has handled
the
> > > > JUnit-integration wonderfully, as far as I know, so your post worries me
a
> > > > little. What is it that you want to accomplish by moving away from the
> > > > successful(!) "Junitcore+RunListener based approach"?
> > > >
> > > > Henrik
> > > >
> > > >
> > > > --- In junit@yahoogroups.com, kristian@ wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I maintain the junit provider for maven-surefire, and I'm looking into
> > > > transitioning from a Junitcore+RunListener based approach to an approach
> > > > based on something like BlockJUnit4ClassRunner.
> > > > >
> > > > > Unfortunately I cannot subclass the BlockJUnit4ClassRunner since the
> > > > client code itself may need to do that, so I'd somehow need to put "my"
> > > > > Runner in front of the client-supplied one, maybe something proxy
like.
> > > > >
> > > > > Anyone have any tips on this, maybe some existing code that does this
?
> > > > >
> > > > > Kristian
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>

#23793 From: Dawid Weiss <dawid.weiss@...>
Date: Thu Jan 5, 2012 11:52 am
Subject: Re: Re: Runner for maven
dawid.weiss@...
Send Email Send Email
 
> maven-surefire now also supports concurrent forks, and they don't have any of
the interaction problems you describe - as you know. Since surefire is an >
all-purpose runner, we try to support any "sensible" mode of execution, and
there are good use cases for both models of execution.

I was thinking about ANT actually, not maven (surefire). I admit we
also needed some extra control over suite allocation scheduling and
more detailed reporting, so surefire wasn't a perfect fit for us. It
is a great tool though, I agree with that.

Dawid

#23794 From: Dawid Weiss <dawid.weiss@...>
Date: Thu Jan 5, 2012 11:55 am
Subject: Re: Re: Runner for maven
dawid.weiss@...
Send Email Send Email
 
Oh, I also didn't mention one more thing -- if you have tests that
fork subthreads which in turn write to System.out/err then you will
also need  a smarter way to track which suite a thread belongs to.
This can be done with a parent thread group (in most cases works) but
like you said -- I think it's just a pain and there is no way to
implement it correctly for all possible use cases.

Dawid

On Thu, Jan 5, 2012 at 12:52 PM, Dawid Weiss <dawid.weiss@...> wrote:
>> maven-surefire now also supports concurrent forks, and they don't have any of
the interaction problems you describe - as you know. Since surefire is an >
all-purpose runner, we try to support any "sensible" mode of execution, and
there are good use cases for both models of execution.
>
> I was thinking about ANT actually, not maven (surefire). I admit we
> also needed some extra control over suite allocation scheduling and
> more detailed reporting, so surefire wasn't a perfect fit for us. It
> is a great tool though, I agree with that.
>
> Dawid

#23795 From: Esko Luontola <esko.luontola@...>
Date: Fri Jan 6, 2012 12:29 pm
Subject: Re: Re: Runner for maven
egeluontola
Send Email Send Email
 
I'm already working on something like that. I'm writing a new test
runner called Jumi http://jumi.fi/ which will have native support for
running tests in parallel in the same JVM, and it take care of capturing
the System.out/err of individual tests.

Jumi will do the output capturing by replacing System.out/err with its
own implementation, which saves all print events (the same way it saves
test lifecycle events), synchronizes both out and err (I think all
current IDEs and build tools fail this:
https://github.com/orfjackal/misc-tools/blob/master/src/test/java/net/orfjackal/\
bugs/SystemOutErrBugTest.java),
and also takes care of capturing the output of threads spawned by the
test thread. For long-lived threads, such as AWT event dispatch thread,
I will also try to figure out something (I'll timestamp all print
events, so it should be possible to figure out roughly which test
printed things in the AWT thread).

The output capturing is at the top of my TODO list, so I will have it
implemented after a couple of productive afternoons when I have time to
work on it. Soon after that I'll make the first alpha release.

I've looked a bit at how to integrate Jumi with maven-surefire. Jumi and
Surefire have some overlap, for example both of them take care of
classloading and starting a JVM process. One option is to use Surefire's
classloading and use only the core runner parts of Jumi. Otherwise Jumi
would need information that what are the dependency JARs, what are the
current project's classes, maybe also that which of them are test and
production classes (Jumi will do caching of the dependencies' class
loaders to speed up the tests). That would require changes to Surefire,
or then a completely new Maven plugin.


kristian@... wrote on 4.1.2012 8:51:
> Sorry, I was doing just what I sometimes dislike of our own users ;)
>
> The real problem I want to solve is associating console output from a
> running thread to a given test-case (for parallel runs). We have this
> fairly well covered already and we manage to capture everything that
> happens within a given test-case for that test-case.
>
> The real problem is that the RunListener API does not demarcate
> test-classes properly, so I am unable to distinguish console output
> happening in @AfterClass of one test with @BeforeClass on the test-class
> on the same thread.
>
> This problem has been in the corner of my eye for quite some time and
> I've been trying to find a decent angle to solve it from. I promise not
> to do anything that is frowned upon, which is why I asked ;)
>
> Kristian
>

--
Esko Luontola
www.orfjackal.net

#23796 From: Dawid Weiss <dawid.weiss@...>
Date: Fri Jan 6, 2012 1:57 pm
Subject: Re: Re: Runner for maven
dawid.weiss@...
Send Email Send Email
 
You may want to look into RandomizedRunner/JUnit4 task -- it has most
of the things you mentioned (synchronized i/o events with reporting,
capturing runaway threads and the like).

The code is here:
https://github.com/carrotsearch/randomizedtesting/

I have a talk about randomized testing which includes the above
concepts at Lucene EuroCon Barcelona, the video is here:
http://vimeo.com/32087114

Dawid

On Fri, Jan 6, 2012 at 1:29 PM, Esko Luontola <esko.luontola@...> wrote:
>
>
>
> I'm already working on something like that. I'm writing a new test
> runner called Jumi http://jumi.fi/ which will have native support for
> running tests in parallel in the same JVM, and it take care of capturing
> the System.out/err of individual tests.
>
> Jumi will do the output capturing by replacing System.out/err with its
> own implementation, which saves all print events (the same way it saves
> test lifecycle events), synchronizes both out and err (I think all
> current IDEs and build tools fail this:
>
https://github.com/orfjackal/misc-tools/blob/master/src/test/java/net/orfjackal/\
bugs/SystemOutErrBugTest.java),
> and also takes care of capturing the output of threads spawned by the
> test thread. For long-lived threads, such as AWT event dispatch thread,
> I will also try to figure out something (I'll timestamp all print
> events, so it should be possible to figure out roughly which test
> printed things in the AWT thread).
>
> The output capturing is at the top of my TODO list, so I will have it
> implemented after a couple of productive afternoons when I have time to
> work on it. Soon after that I'll make the first alpha release.
>
> I've looked a bit at how to integrate Jumi with maven-surefire. Jumi and
> Surefire have some overlap, for example both of them take care of
> classloading and starting a JVM process. One option is to use Surefire's
> classloading and use only the core runner parts of Jumi. Otherwise Jumi
> would need information that what are the dependency JARs, what are the
> current project's classes, maybe also that which of them are test and
> production classes (Jumi will do caching of the dependencies' class
> loaders to speed up the tests). That would require changes to Surefire,
> or then a completely new Maven plugin.
>
> kristian@... wrote on 4.1.2012 8:51:
>
>
> > Sorry, I was doing just what I sometimes dislike of our own users ;)
> >
> > The real problem I want to solve is associating console output from a
> > running thread to a given test-case (for parallel runs). We have this
> > fairly well covered already and we manage to capture everything that
> > happens within a given test-case for that test-case.
> >
> > The real problem is that the RunListener API does not demarcate
> > test-classes properly, so I am unable to distinguish console output
> > happening in @AfterClass of one test with @BeforeClass on the test-class
> > on the same thread.
> >
> > This problem has been in the corner of my eye for quite some time and
> > I've been trying to find a decent angle to solve it from. I promise not
> > to do anything that is frowned upon, which is why I asked ;)
> >
> > Kristian
> >
>
> --
> Esko Luontola
> www.orfjackal.net
>
>

#23797 From: "p.lipinski" <p.lipinski@...>
Date: Mon Jan 9, 2012 11:44 pm
Subject: Re: Better parameterised tests
p.lipinski
Send Email Send Email
 
Actually this thread wasn't related to the standard JUnit Parameterized runner,
which is a failure. It was related to JUnitParams runner
(http://code.google.com/p/junitparams) which BTW. has been released today in the
new version.
Not only does JUnitParams solve the issue stated in the github comments you
posted, but many others as well... You're welcome to use it ;-)

Pawel

--- In junit@yahoogroups.com, "foo_bar_baz_qux" <dimitar.dimitrov@...> wrote:
>
> I was going to start a new thread, but I'll plug in here, to keep the
discussion in one place.
>
> I have had the same problem, different solution and the patch is in github:
https://github.com/KentBeck/junit/pull/145
>
> Florian has same problem, different approach:
https://github.com/KentBeck/junit/pull/358
>
> May the Powers That Be realize that this is a very annoying aspect of JUnit
(forcing us to count lines when a test fails) and consider including any of
these patches in the JUnit tree.
>
> Best regards,
> Dimitar
>

#23798 From: David Saff <david@...>
Date: Tue Jan 17, 2012 4:30 pm
Subject: Re: Temporary increase in project latency
dsaff
Send Email Send Email
 
All,

Sorry for the radio silence that followed this post in last 2011.
Starting today, I've joined the Android team at Google, working on the
Google Books app
(http://saffgreenbar.blogspot.com/2012/01/new-role-at-google.html)

This means that for the first time in three years, I'm now a full-time
user of JUnit again, not just a maintainer.  Starting today, I'm going
to try to get back to one-week maximum latency for new code reviews
and communication around JUnit.  If you've gotten stuck in the backlog
I've built up in the interim, feel free to re-forward and jump the
queue.

Also, if it feels like it's taking a long time to get a code review,
please feel free to use this list to ask other devs to take a first
look: often, the first 80% of improvements, especially around naming
and documentation, can be provided by any suitably experienced
developer.

Thanks for your patience and for supporting each other within the community.

    David Saff

On Mon, Oct 31, 2011 at 2:51 PM, David Saff <david@...> wrote:
> All,
>
> I've been very lucky for several years to had both a family and an
> employer that have left room for me to contribute to JUnit for free.
> However, for at least the next month, two launches are combining to
> absorb the lion's share of my time.  One is named Micah, and is rather
> user-friendly most of the time, but has a somewhat draining
> maintenance schedule, and sporadic uptime.  The other doesn't yet have
> a last name that we're sharing, although I expect the first name will
> be "Google".
>
> Thanks for understanding if your great questions and valuable patches
> are responded to with more delay over the coming weeks.
>
>   David Saff

#23799 From: "foo_bar_baz_qux" <dimitar.dimitrov@...>
Date: Mon Jan 23, 2012 3:08 pm
Subject: Re: Better parameterised tests
foo_bar_baz_qux
Send Email Send Email
 
That is great, besides the fact that I will need to explain my team members and
the procurement department why am I dragging another library in the project, who
will support it and what will happen when the few committers move on to the next
big thing.

We need what is in the package to work - I took the time to implement a
solution, but apparently JUnit has turned into a personal playground for a
chosen few who are not interested in mundane day to day scenarios.

These days I am slowly building support to migrate all project's tests to
TestNG.


--- In junit@yahoogroups.com, "p.lipinski" <p.lipinski@...> wrote:
>
> Actually this thread wasn't related to the standard JUnit Parameterized
runner, which is a failure. It was related to JUnitParams runner
(http://code.google.com/p/junitparams) which BTW. has been released today in the
new version.
> Not only does JUnitParams solve the issue stated in the github comments you
posted, but many others as well... You're welcome to use it ;-)
>
> Pawel
>

#23800 From: David Saff <david@...>
Date: Sun Jan 29, 2012 3:48 am
Subject: Re: Re: Better parameterised tests
dsaff
Send Email Send Email
 
Dimitar,

Patch processing has been slow on JUnit, as I shared with the list
that my paid work and family commitments have been taking up more of
my time over the last few months than before.  I hope you do find a
solution that works for you, whether it involves the overhead of
freely reusing others' efforts or of writing your own.

    David Saff

On Mon, Jan 23, 2012 at 10:08 AM, foo_bar_baz_qux
<dimitar.dimitrov@...> wrote:
> That is great, besides the fact that I will need to explain my team members
and the procurement department why am I dragging another library in the project,
who will support it and what will happen when the few committers move on to the
next big thing.
>
> We need what is in the package to work - I took the time to implement a
solution, but apparently JUnit has turned into a personal playground for a
chosen few who are not interested in mundane day to day scenarios.
>
> These days I am slowly building support to migrate all project's tests to
TestNG.
>
>
> --- In junit@yahoogroups.com, "p.lipinski" <p.lipinski@...> wrote:
>>
>> Actually this thread wasn't related to the standard JUnit Parameterized
runner, which is a failure. It was related to JUnitParams runner
(http://code.google.com/p/junitparams) which BTW. has been released today in the
new version.
>> Not only does JUnitParams solve the issue stated in the github comments you
posted, but many others as well... You're welcome to use it ;-)
>>
>> Pawel
>>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#23801 From: David Saff <david@...>
Date: Tue Jan 31, 2012 7:49 pm
Subject: Call for help: Assertions for Comparable
dsaff
Send Email Send Email
 
All,

I'm trying to catch up on the Pull Request queue, with some help.
Here's a pull request that's essentially ready to go, it just needs
someone with git skills to merge it with HEAD.

This change would add assertGreaterThan and assertLessThan to the
standard assertions.

https://github.com/KentBeck/junit/pull/228

Is anyone motivated and up to the challenge?  Thanks,

    David Saff

#23802 From: Matthew Farwell <matthew@...>
Date: Tue Jan 31, 2012 8:14 pm
Subject: Re: Call for help: Assertions for Comparable
mjfarwell
Send Email Send Email
 
Yeah, I can do it. What exactly needs to be done? A squash and push?

Thanks.

Matthew Farwell.

Le 31 janvier 2012 20:49, David Saff <david@...> a écrit :

> **
>
>
> All,
>
> I'm trying to catch up on the Pull Request queue, with some help.
> Here's a pull request that's essentially ready to go, it just needs
> someone with git skills to merge it with HEAD.
>
> This change would add assertGreaterThan and assertLessThan to the
> standard assertions.
>
> https://github.com/KentBeck/junit/pull/228
>
> Is anyone motivated and up to the challenge? Thanks,
>
> David Saff
>
>


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

#23803 From: Marc Philipp <mphilipp82@...>
Date: Tue Jan 31, 2012 8:13 pm
Subject: Re: Call for help: Assertions for Comparable
mphilipp1982
Send Email Send Email
 
Hi David,

I rebased @leet3lite's master branch onto @KentBeck's and resolved two
conflicts.

Here's a new pull request:
https://github.com/KentBeck/junit/pull/376

Please let me know if this one works better.

Cheers, Marc


Am 31.01.2012 um 20:49 schrieb David Saff:

> All,
>
> I'm trying to catch up on the Pull Request queue, with some help.
> Here's a pull request that's essentially ready to go, it just needs
> someone with git skills to merge it with HEAD.
>
> This change would add assertGreaterThan and assertLessThan to the
> standard assertions.
>
> https://github.com/KentBeck/junit/pull/228
>
> Is anyone motivated and up to the challenge? Thanks,
>
> David Saff
>



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

#23804 From: "M.Srinivas" <srinivasmallabathul@...>
Date: Tue Jan 31, 2012 1:20 pm
Subject: Coding review is possible with JUnit?
srinivasmall...
Send Email Send Email
 
I am new to JUnit.Entire project has developed using spring and JSPs. Now my job
is review code and notice whether it follows coding standards or not.They didn't
write any code for JUnit.
I want to use JUnit for this purpose. Is it possible with JUnit.If it is
possible can I write any extra code for this
Thanks

#23805 From: Georg Thimm <le_garcon_enerve@...>
Date: Wed Feb 1, 2012 1:32 pm
Subject: Re: Call for help: Assertions for Comparable
le_garcon_en...
Send Email Send Email
 
Hi!

Please feel fre to take some code for this out of "unofficialjunit" on
sourceforge.

Regards,
 Georg


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

#23806 From: wensi liu <juky.liu@...>
Date: Tue Feb 7, 2012 1:38 am
Subject: Customize the JUnit result
juky.liu@...
Send Email Send Email
 
Hi All,

Is there a way to get more detail info after running test cases? like spend
how many time for each test case? list all passed test cases other than
just failed?

I am able to get some limit info form TestResult, but not enough to me.

any suggestions would be appreciate!

I launch test by TestRunner BTW.

Thanks
Wensi


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

#23807 From: "Wayne" <wdtj@...>
Date: Wed Feb 15, 2012 2:54 pm
Subject: Displaying test case name from the testcase
wdtj
Send Email Send Email
 
Forgive me if this is a FAQ, but I have tried digging through the documentation
and the answer was not apparent.

I am writing some test cases.  As part of the testing, I want to keep a log of
the responses from the code for debugging purposes.  It would be really helpful
to have some simple process to print out the tests name and other properties
into the log.  Since there are hundreds of tests, I would like to make this a
common step (ie call a method) to do this.  Problem is finding the name of the
test itself (without having to pass it into the logging method or hacking the
stack).

I see there is a Description class in the runner.  Is there any way to access
the runner (i.e. a singleton or static getter) from the test case?

#23808 From: Dawid Weiss <dawid.weiss@...>
Date: Wed Feb 15, 2012 11:05 pm
Subject: Re: Displaying test case name from the testcase
dawid.weiss@...
Send Email Send Email
 
You should write a @Rule that will intercept the Description associated
with the current test case and store it somewhere (or use it directly).
Check out the javadoc for @Rule.

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


Dawid

On Wed, Feb 15, 2012 at 3:54 PM, Wayne <wdtj@...> wrote:

> **
>
>
> Forgive me if this is a FAQ, but I have tried digging through the
> documentation and the answer was not apparent.
>
> I am writing some test cases. As part of the testing, I want to keep a log
> of the responses from the code for debugging purposes. It would be really
> helpful to have some simple process to print out the tests name and other
> properties into the log. Since there are hundreds of tests, I would like to
> make this a common step (ie call a method) to do this. Problem is finding
> the name of the test itself (without having to pass it into the logging
> method or hacking the stack).
>
> I see there is a Description class in the runner. Is there any way to
> access the runner (i.e. a singleton or static getter) from the test case?
>
>
>


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

#23809 From: David Saff <david@...>
Date: Thu Feb 16, 2012 2:32 am
Subject: Re: Displaying test case name from the testcase
dsaff
Send Email Send Email
 
See also
https://github.com/KentBeck/junit/blob/master/src/main/java/org/junit/rules/Test\
Name.java

On Wed, Feb 15, 2012 at 6:05 PM, Dawid Weiss <dawid.weiss@...> wrote:
> You should write a @Rule that will intercept the Description associated
> with the current test case and store it somewhere (or use it directly).
> Check out the javadoc for @Rule.
>
> http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TestRule.html
>
>
> Dawid
>
> On Wed, Feb 15, 2012 at 3:54 PM, Wayne <wdtj@...> wrote:
>
>> **
>>
>>
>> Forgive me if this is a FAQ, but I have tried digging through the
>> documentation and the answer was not apparent.
>>
>> I am writing some test cases. As part of the testing, I want to keep a log
>> of the responses from the code for debugging purposes. It would be really
>> helpful to have some simple process to print out the tests name and other
>> properties into the log. Since there are hundreds of tests, I would like to
>> make this a common step (ie call a method) to do this. Problem is finding
>> the name of the test itself (without having to pass it into the logging
>> method or hacking the stack).
>>
>> I see there is a Description class in the runner. Is there any way to
>> access the runner (i.e. a singleton or static getter) from the test case?
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#23810 From: "coretek89" <coretek89@...>
Date: Thu Feb 16, 2012 10:24 am
Subject: JUnitCore Stopping
coretek89
Send Email Send Email
 
Hello,

I wan't to ask for a solution to stop and/or destroy a JUnitCore.
Like pleaseStop() on the RunNotifier.

I already tried ExecutorsService with no success.
My only not yet tested solution is to System.exit my java programm after
starting a new process of it.

#23811 From: "nirh20" <nir.heifetz@...>
Date: Wed Feb 22, 2012 2:27 pm
Subject: How to set the order in Junit
nirh20
Send Email Send Email
 
Hi all
I would like to know  how to set an order in Junit,
Details: the Junit tests are executing from quickbuild.
Thanks

#23812 From: Matthew Farwell <matthew@...>
Date: Wed Feb 22, 2012 3:48 pm
Subject: Re: How to set the order in Junit
mjfarwell
Send Email Send Email
 
Hi,

If you're asking about the ordering of tests, it's discouraged in JUnit.
For more information, see this stackoverflow Answer:

http://stackoverflow.com/questions/7845929/has-junit4-begun-supporting-ordering-\
of-test-is-it-intentional/7846712#7846712


Matthew Farwell.

Le 22 février 2012 15:27, nirh20 <nir.heifetz@...> a écrit :

> **
>
>
> Hi all
> I would like to know how to set an order in Junit,
> Details: the Junit tests are executing from quickbuild.
> Thanks
>
>
>


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

#23813 From: "nirh20" <nir.heifetz@...>
Date: Thu Feb 23, 2012 7:29 am
Subject: Re: How to set the order in Junit
nirh20
Send Email Send Email
 
Thank you very much!
I will look on it


--- In junit@yahoogroups.com, Matthew Farwell <matthew@...> wrote:
>
> Hi,
>
> If you're asking about the ordering of tests, it's discouraged in JUnit.
> For more information, see this stackoverflow Answer:
>
>
http://stackoverflow.com/questions/7845929/has-junit4-begun-supporting-ordering-\
of-test-is-it-intentional/7846712#7846712
>
>
> Matthew Farwell.
>
> Le 22 février 2012 15:27, nirh20 <nir.heifetz@...> a écrit :
>
> > **
> >
> >
> > Hi all
> > I would like to know how to set an order in Junit,
> > Details: the Junit tests are executing from quickbuild.
> > Thanks
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>

#23814 From: "mjfarwell" <matthew@...>
Date: Sat Feb 25, 2012 6:11 am
Subject: Re: Alphabetizing test method run order?
mjfarwell
Send Email Send Email
 
Hi,

I've submitted a pull request for this
https://github.com/KentBeck/junit/pull/386.

@SortMethodsWith(MethodSorters.NAME_ASC)
public class MyTest {
}


There are four possibilities for the MethodSorters:

MethodSorters.DEFAULT: the default value, deterministic, but not predictable
MethodSorters.JVM: the order in which the tests are returned by the JVM, i.e.
there is no sorting done
MethodSorters.NAME_ASC: sorted in order of method name, ascending
MethodSorters.NAME_DESC: sorter in order of method name, descending

I would love to have feedback on this proposal.

Thanks.

Matthew Farwell.

--- In junit@yahoogroups.com, David Saff <david@...> wrote:
>
> On Thu, Sep 22, 2011 at 9:08 AM, mjfarwell <matthew@...> wrote:
> > If you change the order then at least change it so that if people have
problems due to ordering they can easily change the order. Yes, I know that
their tests are broken, but they probably do too. If the order is based upon the
hashCode, I have to either run that test with a custom Runner (and make sure
that it's usable in Eclipse, Jenkins, maven, etc. etc.)[*]. If the order is
simply the name, then all I have to do to 'fix' my problem is change the name.
>
> That's a fair request.  Actually, I think the code has evolved to the
> point that adding a feature to ParentRunner to support this would be
> remarkably easy:
>
> @RunWith(Suite.class)
> @SuiteClasses({...})
> public class MySuite {
>   @SortWith public static Sorter alpha = Sorters.ALPHABETICAL;
>   @FilterWith public static Filter category = new
> CategoryFilter(MyCategory.class);
> }
>
> Anyone want to take a crack at it?
>
>    David Saff

#23815 From: anu smina <anu_rose45@...>
Date: Sun Feb 26, 2012 11:42 am
Subject: Urgent please clear my doubts
anu_rose45
Send Email Send Email
 
I dont know how to install and run  junit. I tried different methods given in
the web. Nothing works. So please help me to run the program

1. Java is intstalled in C:\Program Files\Java\Jdk1.6.0
2. At which location should i intstall Junit( Eg: F:\)
3. If i installed JUnit in (F:\) the where should i place the program
checkforprime.java and checkforprimetest.java. In C drive or in F drive
4. Im having Windows OS.


Please send me the steps to run the program


Regards
Anu Smitha


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

#23816 From: Malte Finsterwalder <malte@...>
Date: Mon Feb 27, 2012 3:00 pm
Subject: Re: Urgent please clear my doubts
maltefinster...
Send Email Send Email
 
JUnit is a jar file, which needs to be added to your classpath. So you
can install it anywhere.
The easiest way to run junit is actually in an IDE (Eclipse, IntelliJ,
Netbeans, ...)

Greetings,
    Malte

On 26 February 2012 12:42, anu smina <anu_rose45@...> wrote:
> I dont know how to install and run  junit. I tried different methods given in
the web. Nothing works. So please help me to run the program
>
> 1. Java is intstalled in C:\Program Files\Java\Jdk1.6.0
> 2. At which location should i intstall Junit( Eg: F:\)
> 3. If i installed JUnit in (F:\) the where should i place the program
checkforprime.java and checkforprimetest.java. In C drive or in F drive
> 4. Im having Windows OS.
>
>
> Please send me the steps to run the program
>
>
> Regards
> Anu Smitha
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#23817 From: mihir jhala <mihir_933@...>
Date: Mon Feb 27, 2012 7:58 pm
Subject: Re: Urgent please clear my doubts
mihirjhala
Send Email Send Email
 
Hello,
 
Better way to work with Juint is to have IDE like eclipse.It allready has Juint
in-built in it.So you can download eclipse and when you go to
file-->new--->other---->java ---->it will have Juint option.You can create your
test cases from there.
 
 
Thanks,
Mihir


________________________________
From: anu smina <anu_rose45@...>
To: junit@yahoogroups.com
Sent: Sunday, 26 February 2012 6:42 AM
Subject: [junit] Urgent please clear my doubts


 
I dont know how to install and run  junit. I tried different methods given in
the web. Nothing works. So please help me to run the program

1. Java is intstalled in C:\Program Files\Java\Jdk1.6.0
2. At which location should i intstall Junit( Eg: F:\)
3. If i installed JUnit in (F:\) the where should i place the program
checkforprime.java and checkforprimetest.java. In C drive or in F drive
4. Im having Windows OS.

Please send me the steps to run the program

Regards
Anu Smitha

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




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

#23818 From: "mjfarwell" <matthew@...>
Date: Tue Feb 28, 2012 7:08 am
Subject: Removing methods JUnitCore#runMainAndExit and JUnitCore#runMain
mjfarwell
Send Email Send Email
 
Hi,
I've submitted a pull request to make private the methods
JUnitCore#runMainAndExit and JUnitCore#runMain
(https://github.com/KentBeck/junit/blob/master/src/main/java/org/junit/r\
unner/JUnitCore.java)
Can I ask anyone who uses these methods to say so, because we want a
small survey to see if they are used extensively. Also, if you do use
them, can you say if you could work without them. Please note that both
of these methods are marked as do not use:
/** * Do not use. Testing purposes only. * @param system  */
This is the pull request: https://github.com/KentBeck/junit/pull/370
<https://github.com/KentBeck/junit/pull/370> .
I did a quick github search, and I found two projects which use runMain
(none that use runMainAndExit):
https://github.com/gliptak/JAllele <https://github.com/gliptak/JAllele>
(multiple uses, last modification 2 years
ago)https://github.com/SteMo/Zeiterfassung_HiWis_TUD (single use)
Does anyone use these methods?
Thanks.
Matthew Farwell.






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

#23819 From: "saurav" <sauravkr@...>
Date: Tue Feb 28, 2012 2:17 am
Subject: RE: Urgent please clear my doubts
sauravkr
Send Email Send Email
 
You can put anything at any place just classpath for jars and path for java
command  should be defined.



Regards,

Saurav



From: junit@yahoogroups.com [mailto:junit@yahoogroups.com] On Behalf Of mihir
jhala
Sent: Tuesday, February 28, 2012 1:28 AM
To: junit@yahoogroups.com
Subject: Re: [junit] Urgent please clear my doubts





Hello,

Better way to work with Juint is to have IDE like eclipse.It allready has Juint
in-built in it.So you can download eclipse and when you go to
file-->new--->other---->java ---->it will have Juint option.You can create your
test cases from there.


Thanks,
Mihir

________________________________
From: anu smina <anu_rose45@... <mailto:anu_rose45%40yahoo.co.in> >
To: junit@yahoogroups.com <mailto:junit%40yahoogroups.com>
Sent: Sunday, 26 February 2012 6:42 AM
Subject: [junit] Urgent please clear my doubts


I dont know how to install and run  junit. I tried different methods given in
the web. Nothing works. So please help me to run the program

1. Java is intstalled in C:\Program Files\Java\Jdk1.6.0
2. At which location should i intstall Junit( Eg: F:\)
3. If i installed JUnit in (F:\) the where should i place the program
checkforprime.java and checkforprimetest.java. In C drive or in F drive
4. Im having Windows OS.

Please send me the steps to run the program

Regards
Anu Smitha

[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]

#23820 From: "sk_smile5n" <sk_smile5n@...>
Date: Wed Feb 29, 2012 10:13 am
Subject: Integrating unit tests
sk_smile5n
Send Email Send Email
 
I have multiple products/applications. Some are running on Java background and
some on .NET background.
Correspondingly unit test cases are written for both the cases.
Let us say for Java applications unit tests are written in JUNIT.
For .NET applications unit tests are written in NUNIT.

We can also assume that these tests are configured in some build tool like
ANT,Maven,NMaven etc.

My requirement is to integrate all these tests in a common framework(or a
platform) and run them in a common environment which can be User Interface or a
batch or a command.


Please let me know if am not clear with the requirement.

#23821 From: Matthew Farwell <matthew@...>
Date: Wed Feb 29, 2012 1:22 pm
Subject: Re: Integrating unit tests
mjfarwell
Send Email Send Email
 
Salut,

You can probably use jenkins for this, although I haven't done it myself. I
found the following references on the net:

Jenkins – TFS and MSBuild: http://yakiloo.com/jenkins-tfs-and-msbuild/
MSBuild + NUnit:
http://jenkins.361315.n4.nabble.com/MSBuild-NUnit-td377769.html

I would look at the jenkins docs for more information, for instance:
https://wiki.jenkins-ci.org/display/JENKINS/NUnit+Plugin

Matthew Farwell.


Le 29 février 2012 11:13, sk_smile5n <sk_smile5n@...> a écrit :

> **
>
>
> I have multiple products/applications. Some are running on Java background
> and some on .NET background.
> Correspondingly unit test cases are written for both the cases.
> Let us say for Java applications unit tests are written in JUNIT.
> For .NET applications unit tests are written in NUNIT.
>
> We can also assume that these tests are configured in some build tool like
> ANT,Maven,NMaven etc.
>
> My requirement is to integrate all these tests in a common framework(or a
> platform) and run them in a common environment which can be User Interface
> or a batch or a command.
>
> Please let me know if am not clear with the requirement.
>
>
>


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

Messages 23792 - 23821 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