|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.testing.Test
class Test extends ConventionTask
A task for executing Junit 3.8.x and Junit 4 tests.
Field Summary | |
---|---|
static java.lang.String |
FAILURES_OR_ERRORS_PROPERTY
|
static java.lang.String |
TEST_FRAMEWORK_DEFAULT_PROPERTY
|
protected ExistingDirsFilter |
existingDirsFilter
|
Constructor Summary | |
Test(Project project, java.lang.String name)
|
Method Summary | |
---|---|
void
|
disableTestReport()
|
void
|
enableTestReport()
|
Test
|
exclude(java.lang.String excludes)
Adds exclude patterns for the files in the test classes directory (e.g. '**F;*Test.class')). |
Test
|
exclude(java.lang.Iterable excludes)
Adds exclude patterns for the files in the test classes directory (e.g. '**F;*Test.class')). |
protected void
|
executeTests()
|
List
|
getClasspath()
|
FileCollection
|
getConfiguration()
|
Set
|
getExcludes()
Returns the exclude patterns for test execution. |
Set
|
getIncludes()
Returns the include patterns for test execution. |
java.lang.Object
|
getOptions()
Backwards compatible access to the TestFramework options. |
File
|
getTestClassesDir()
Returns the root folder for the compiled test sources. |
TestFramework
|
getTestFramework()
|
File
|
getTestReportDir()
Returns the root folder for the test reports. |
File
|
getTestResultsDir()
Returns the root folder for the test results. |
List
|
getTestSrcDirs()
|
Test
|
include(java.lang.String includes)
Adds include patterns for the files in the test classes directory (e.g. '**F;*Test.class')). |
Test
|
include(java.lang.Iterable includes)
Adds include patterns for the files in the test classes directory (e.g. '**F;*Test.class')). |
boolean
|
isScanForTestClasses()
|
boolean
|
isStopAtFailuresOrErrors()
Returns whether this task should throw an exception in case of test failure or error. |
boolean
|
isTestReport()
|
java.lang.Object
|
options(Closure testFrameworkConfigure)
|
void
|
setConfiguration(FileCollection configuration)
|
Test
|
setExcludes(java.lang.Iterable excludes)
Sets the exclude patterns for test execution. |
Test
|
setIncludes(java.lang.Iterable includes)
Sets the include patterns for test execution. |
void
|
setScanForTestClasses(boolean scanForTestClasses)
|
void
|
setStopAtFailuresOrErrors(boolean stopAtFailuresOrErrors)
Sets whether this task should throw an exception in case of test failuer or error. |
void
|
setTestClassesDir(File testClassesDir)
Sets the root folder for the compiled test sources. |
void
|
setTestReport(boolean testReport)
|
void
|
setTestReportDir(File testReportDir)
Sets the root folder for the test reports. |
void
|
setTestResultsDir(File testResultsDir)
Sets the root folder for the test results. |
void
|
setTestSrcDirs(List testSrcDir)
|
TestFramework
|
testFramework(Closure testFrameworkConfigure)
|
TestFramework
|
useDefaultTestFramework(Closure testFrameworkConfigure)
|
TestFramework
|
useJUnit()
|
TestFramework
|
useJUnit(Closure testFrameworkConfigure)
|
TestFramework
|
useTestFramework(TestFramework testFramework)
|
TestFramework
|
useTestFramework(TestFramework testFramework, Closure testFrameworkConfigure)
|
TestFramework
|
useTestNG()
|
TestFramework
|
useTestNG(Closure testFrameworkConfigure)
|
Methods inherited from class ConventionTask | |
---|---|
conv, conventionMapping, conventionMapping, conventionProperty, getConventionAwareHelper, getConventionMapping, setConventionAwareHelper, setConventionMapping |
Methods inherited from class DefaultTask | |
---|---|
leftShift, methodMissing, propertyMissing |
Methods inherited from class java.lang.Object | |
---|---|
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll |
Field Detail |
---|
static final java.lang.String FAILURES_OR_ERRORS_PROPERTY
static final java.lang.String TEST_FRAMEWORK_DEFAULT_PROPERTY
protected ExistingDirsFilter existingDirsFilter
Constructor Detail |
---|
public Test(Project project, java.lang.String name)
Method Detail |
---|
public void disableTestReport()
public void enableTestReport()
public Test exclude(java.lang.String excludes)
public Test exclude(java.lang.Iterable excludes)
protected void executeTests()
public List getClasspath()
public FileCollection getConfiguration()
public Set getExcludes()
public Set getIncludes()
public java.lang.Object getOptions()
public File getTestClassesDir()
public TestFramework getTestFramework()
public File getTestReportDir()
public File getTestResultsDir()
public List getTestSrcDirs()
public Test include(java.lang.String includes)
public Test include(java.lang.Iterable includes)
public boolean isScanForTestClasses()
public boolean isStopAtFailuresOrErrors()
public boolean isTestReport()
public java.lang.Object options(Closure testFrameworkConfigure)
public void setConfiguration(FileCollection configuration)
public Test setExcludes(java.lang.Iterable excludes)
public Test setIncludes(java.lang.Iterable includes)
public void setScanForTestClasses(boolean scanForTestClasses)
public void setStopAtFailuresOrErrors(boolean stopAtFailuresOrErrors)
public void setTestClassesDir(File testClassesDir)
public void setTestReport(boolean testReport)
public void setTestReportDir(File testReportDir)
public void setTestResultsDir(File testResultsDir)
public void setTestSrcDirs(List testSrcDir)
public TestFramework testFramework(Closure testFrameworkConfigure)
public TestFramework useDefaultTestFramework(Closure testFrameworkConfigure)
public TestFramework useJUnit()
public TestFramework useJUnit(Closure testFrameworkConfigure)
public TestFramework useTestFramework(TestFramework testFramework)
public TestFramework useTestFramework(TestFramework testFramework, Closure testFrameworkConfigure)
public TestFramework useTestNG()
public TestFramework useTestNG(Closure testFrameworkConfigure)
Groovy Documentation