|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gradle.api.internal.AbstractTask org.gradle.api.DefaultTask org.gradle.api.internal.ConventionTask org.gradle.api.tasks.testing.Test
public class Test
A task for executing Junit 3.8.x and Junit 4 tests.
Field Summary | |
---|---|
protected ExistingDirsFilter |
existingDirsFilter
|
static java.lang.String |
FAILURES_OR_ERRORS_PROPERTY
|
static java.lang.String |
TEST_FRAMEWORK_DEFAULT_PROPERTY
|
Fields inherited from interface org.gradle.api.Task |
---|
AUTOSKIP_PROPERTY_PREFIX, TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_NAME, TASK_OVERWRITE, TASK_TYPE |
Constructor Summary | |
---|---|
Test(Project project,
java.lang.String name)
|
Method Summary | |
---|---|
void |
disableTestReport()
|
void |
enableTestReport()
|
Test |
exclude(java.lang.Iterable<java.lang.String> excludes)
Adds exclude patterns for the files in the test classes directory (e.g. |
Test |
exclude(java.lang.String... excludes)
Adds exclude patterns for the files in the test classes directory (e.g. |
protected void |
executeTests()
|
java.util.List<java.io.File> |
getClasspath()
|
FileCollection |
getConfiguration()
|
java.util.Set<java.lang.String> |
getExcludes()
Returns the exclude patterns for test execution. |
java.util.Set<java.lang.String> |
getIncludes()
Returns the include patterns for test execution. |
java.lang.Object |
getOptions()
Backwards compatible access to the TestFramework options. |
java.io.File |
getTestClassesDir()
Returns the root folder for the compiled test sources. |
TestFramework |
getTestFramework()
|
java.io.File |
getTestReportDir()
Returns the root folder for the test reports. |
java.io.File |
getTestResultsDir()
Returns the root folder for the test results. |
java.util.List<java.io.File> |
getTestSrcDirs()
|
Test |
include(java.lang.Iterable<java.lang.String> includes)
Adds include patterns for the files in the test classes directory (e.g. |
Test |
include(java.lang.String... includes)
Adds include patterns for the files in the test classes directory (e.g. |
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(groovy.lang.Closure testFrameworkConfigure)
|
void |
setConfiguration(FileCollection configuration)
|
Test |
setExcludes(java.lang.Iterable<java.lang.String> excludes)
Sets the exclude patterns for test execution. |
Test |
setIncludes(java.lang.Iterable<java.lang.String> 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(java.io.File testClassesDir)
Sets the root folder for the compiled test sources. |
void |
setTestReport(boolean testReport)
|
void |
setTestReportDir(java.io.File testReportDir)
Sets the root folder for the test reports. |
void |
setTestResultsDir(java.io.File testResultsDir)
Sets the root folder for the test results. |
void |
setTestSrcDirs(java.util.List<java.io.File> testSrcDir)
|
TestFramework |
testFramework(groovy.lang.Closure testFrameworkConfigure)
|
TestFramework |
useDefaultTestFramework(groovy.lang.Closure testFrameworkConfigure)
|
TestFramework |
useJUnit()
|
TestFramework |
useJUnit(groovy.lang.Closure testFrameworkConfigure)
|
TestFramework |
useTestFramework(TestFramework testFramework)
|
TestFramework |
useTestFramework(TestFramework testFramework,
groovy.lang.Closure testFrameworkConfigure)
|
TestFramework |
useTestNG()
|
TestFramework |
useTestNG(groovy.lang.Closure testFrameworkConfigure)
|
Methods inherited from class org.gradle.api.internal.ConventionTask |
---|
conv, conventionMapping, conventionMapping, conventionProperty, getConventionAwareHelper, getConventionMapping, setConventionAwareHelper, setConventionMapping |
Methods inherited from class org.gradle.api.DefaultTask |
---|
configure, doFirst, doLast, leftShift, methodMissing, propertyMissing, setProperty |
Methods inherited from class org.gradle.api.internal.AbstractTask |
---|
captureStandardOutput, compareTo, defineProperty, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuted, getLogger, getName, getPath, getProject, getSkipProperties, getStandardOutputCapture, getTaskDependencies, hashCode, hasProperty, isDidWork, isEnabled, isExecuted, onlyIf, onlyIf, property, setActions, setAdditionalProperties, setDependsOn, setDescription, setDidWork, setEnabled, setExecuted, setName, setProject, setSkipProperties, setStandardOutputCapture, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface groovy.lang.GroovyObject |
---|
getMetaClass, getProperty, invokeMethod, setMetaClass |
Field Detail |
---|
public static final java.lang.String FAILURES_OR_ERRORS_PROPERTY
public static final java.lang.String TEST_FRAMEWORK_DEFAULT_PROPERTY
protected ExistingDirsFilter existingDirsFilter
Constructor Detail |
---|
public Test(Project project, java.lang.String name)
Method Detail |
---|
protected void executeTests()
public java.util.List<java.io.File> getClasspath()
public Test include(java.lang.String... includes)
include
in interface PatternFilterable
setIncludes(Iterable)
public Test include(java.lang.Iterable<java.lang.String> includes)
include
in interface PatternFilterable
setIncludes(Iterable)
public Test exclude(java.lang.String... excludes)
exclude
in interface PatternFilterable
setExcludes(Iterable)
public Test exclude(java.lang.Iterable<java.lang.String> excludes)
exclude
in interface PatternFilterable
setExcludes(Iterable)
public java.io.File getTestClassesDir()
public void setTestClassesDir(java.io.File testClassesDir)
testClassesDir
- The root folderpublic java.io.File getTestResultsDir()
public void setTestResultsDir(java.io.File testResultsDir)
testResultsDir
- The root folderpublic java.io.File getTestReportDir()
public void setTestReportDir(java.io.File testReportDir)
testReportDir
- The root folderpublic java.util.Set<java.lang.String> getIncludes()
getIncludes
in interface PatternFilterable
include(String[])
public Test setIncludes(java.lang.Iterable<java.lang.String> includes)
setIncludes
in interface PatternFilterable
includes
- The patterns listinclude(String[])
public java.util.Set<java.lang.String> getExcludes()
getExcludes
in interface PatternFilterable
include(String[])
public Test setExcludes(java.lang.Iterable<java.lang.String> excludes)
setExcludes
in interface PatternFilterable
excludes
- The patterns listexclude(String[])
public boolean isStopAtFailuresOrErrors()
public void setStopAtFailuresOrErrors(boolean stopAtFailuresOrErrors)
public TestFramework getTestFramework()
public TestFramework testFramework(groovy.lang.Closure testFrameworkConfigure)
public java.lang.Object getOptions()
public java.lang.Object options(groovy.lang.Closure testFrameworkConfigure)
public TestFramework useTestFramework(TestFramework testFramework)
public TestFramework useTestFramework(TestFramework testFramework, groovy.lang.Closure testFrameworkConfigure)
public TestFramework useJUnit()
public TestFramework useJUnit(groovy.lang.Closure testFrameworkConfigure)
public TestFramework useTestNG()
public TestFramework useTestNG(groovy.lang.Closure testFrameworkConfigure)
public TestFramework useDefaultTestFramework(groovy.lang.Closure testFrameworkConfigure)
public FileCollection getConfiguration()
public void setConfiguration(FileCollection configuration)
public boolean isTestReport()
public void setTestReport(boolean testReport)
public void enableTestReport()
public void disableTestReport()
public java.util.List<java.io.File> getTestSrcDirs()
public void setTestSrcDirs(java.util.List<java.io.File> testSrcDir)
public boolean isScanForTestClasses()
public void setScanForTestClasses(boolean scanForTestClasses)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |