On 12/07/10 4:09 AM, John Murph wrote:
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.
There's also an example of exactly the above in
$gradleHome/samples/java/withIntegrationTests
On Sun, Jul 11, 2010 at 9:40 AM, Matthias Bohlen <[email protected]
<mailto:[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
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz