Adding parallel JUnit task

View: New views
4 Messages — Rating Filter:   Alert me  

Adding parallel JUnit task

by Jason Rutherglen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, please excuse the newbie question.
For the Apache Lucene project I'd like to paralleize the unit tests by
subclassing JUnitTask into ParallelJUnitTask which executes JUnitTests in
threads.

I don't understand how to place things like <batchtest> into the new
<paralleljunit> task tag properly.  Here's what I've tried in the build.xml:

<paralleljunit xmlns="antlib:org.apache.lucene.ant" printsummary="off"
haltonfailure="no" maxmemory="512M">
      <contrib-settings />
      <formatter type="xml"/>
      <formatter type="brief" usefile="false"/>
      <batchtest fork="yes" todir="@{junit.output.dir}" if="runall">
        <fileset dir="@{dataDir}" includes="${junit.includes}"
excludes="${junit.excludes}"/>
      </batchtest>
      <batchtest fork="yes" todir="@{junit.output.dir}" if="testpackage">
        <fileset dir="@{dataDir}"
includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"
excludes="${junit.excludes}"/>
      </batchtest>
      <batchtest fork="yes" todir="@{junit.output.dir}"
if="testpackageroot">
        <fileset dir="@{dataDir}"
includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"
excludes="${junit.excludes}"/>
      </batchtest>
      <batchtest fork="yes" todir="@{junit.output.dir}" if="testcase">
        <fileset dir="@{dataDir}" includes="**/${testcase}.java"/>
      </batchtest>
  </paralleljunit>

Re: Adding parallel JUnit task

by Steve Loughran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jason Rutherglen wrote:
> Hello, please excuse the newbie question.
> For the Apache Lucene project I'd like to paralleize the unit tests by
> subclassing JUnitTask into ParallelJUnitTask which executes JUnitTests in
> threads.
>
> I don't understand how to place things like <batchtest> into the new
> <paralleljunit> task tag properly.  Here's what I've tried in the build.xml:
>

I've been thinking of an extra junit4 task in its own antlib, this could
go alongside it. I've also done a junit3 runner for hadoop, runs each
test suite as a separate task...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: Adding parallel JUnit task

by Jason Rutherglen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I've been thinking of an extra junit4 task in its own antlib, this could
go alongside it. I've also done a junit3 runner for hadoop, runs each test
suite as a separate task... That sounds like a good approach. This way one
simply needs to add a jar to their existing project. Hadoop sounds great as
well.

On Wed, Jul 1, 2009 at 9:25 AM, Steve Loughran <stevel@...> wrote:

> Jason Rutherglen wrote:
>
>> Hello, please excuse the newbie question.
>> For the Apache Lucene project I'd like to paralleize the unit tests by
>> subclassing JUnitTask into ParallelJUnitTask which executes JUnitTests in
>> threads.
>>
>> I don't understand how to place things like <batchtest> into the new
>> <paralleljunit> task tag properly.  Here's what I've tried in the
>> build.xml:
>>
>>
> I've been thinking of an extra junit4 task in its own antlib, this could go
> alongside it. I've also done a junit3 runner for hadoop, runs each test
> suite as a separate task...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

Re: Adding parallel JUnit task

by Konstantin Boudnik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jason.

It is an interesting insight. This junit runner for Hadoop you've mentioned,
would it actually allow to parallel an execution of a bunch of tests on a
multi-way hardware? Or it would require someone to make manual split of tests
into separate test suites first?

Is the source code is available anywhere?

Thanks for any information you can share
  Konstantin (Cos) Boudnik

On Wed, Jul 01, 2009 at 03:27PM, Jason Rutherglen wrote:

> > I've been thinking of an extra junit4 task in its own antlib, this could
> go alongside it. I've also done a junit3 runner for hadoop, runs each test
> suite as a separate task... That sounds like a good approach. This way one
> simply needs to add a jar to their existing project. Hadoop sounds great as
> well.
>
> On Wed, Jul 1, 2009 at 9:25 AM, Steve Loughran <stevel@...> wrote:
>
> > Jason Rutherglen wrote:
> >
> >> Hello, please excuse the newbie question.
> >> For the Apache Lucene project I'd like to paralleize the unit tests by
> >> subclassing JUnitTask into ParallelJUnitTask which executes JUnitTests in
> >> threads.
> >>
> >> I don't understand how to place things like <batchtest> into the new
> >> <paralleljunit> task tag properly.  Here's what I've tried in the
> >> build.xml:
> >>
> >>
> > I've been thinking of an extra junit4 task in its own antlib, this could go
> > alongside it. I've also done a junit3 runner for hadoop, runs each test
> > suite as a separate task...
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@...
> > For additional commands, e-mail: user-help@...
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...