gradle/gradle — pull request #194 by ywelsch (2013-09-08 14:48:46+00:00)
Title: Support to run tests in jar files and other class folders

The following patch is a proposal for http://issues.gradle.org//browse/GRADLE-2654

The test task can be configured with the property **additionalTests** which is a FileCollection of additional jars or class folders to be used when searching test classes.

A typical example looks as follows:

```
apply plugin: 'java'

repositories {
mavenCentral()
}

configurations {
testsJar
}

dependencies {
testRuntime 'org.apache.commons:commons-lang3:3.1'
testRuntime 'junit:junit:4.10'
testsJar 'org.apache.commons:commons-lang3:3.1:tests@jar'
}

test {
additionalTests = configurations.testsJar
classpath += configurations.testsJar
exclude 'org/apache/commons/lang3/concurrent/**'
}
```