Use source sets.  First, put your integration tests in a different source
dir (as a peer to src/main and src/test, such as src/integTest).  Then,
create a sourceSet in your build script

sourceSets {
  integTest {
     srcDir file('src/integTest')
      ... other stuff ...
   }
}

The source sets will automatically make a compile task for you.  Then you
just make a "type: Test" task that depends on the compile task and your
done.

P.S.  My sourceSets syntax above is probably wrong, I'm doing it from
memory.  You'll have to look it up in the user's guide to get the exact
details.


On Sun, Jul 11, 2010 at 9:40 AM, Matthias Bohlen <[email protected]>wrote:

> Hi,
>
> in my project, I have tests that run quickly because they test a single
> class. I also have integration tests that take lots of resources (time,
> memory, databases. etc.) - I'd like to separate those integration tests from
> the unit tests. How can I do something like this?
>
> gradle test --> unit tests
> gradle integrationtests --> integration tests
>
> Cheers
> Matthias
>
>

-- 
John Murph
Automated Logic Research Team

Reply via email to