|
|||||||||
| PREV CLASS NEXT CLASS | 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
public class Test
A task for executing JUnit (3.8.x or 4) or TestNG tests.
| Field Summary | |
|---|---|
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()
|
|
| 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()
|
FileCollection |
getClasspath()
|
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 |
setClasspath(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 |
|---|
conventionMapping, getConventionMapping, setConventionMapping |
| Methods inherited from class org.gradle.api.DefaultTask |
|---|
configure, doFirst, doLast, leftShift |
| Methods inherited from class org.gradle.api.internal.AbstractTask |
|---|
captureStandardOutput, compareTo, defineProperty, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuted, getLogger, getName, getOutput, getPath, getProject, getStandardOutputCapture, getTaskDependencies, hashCode, hasProperty, injectIntoNextInstance, isDidWork, isEnabled, isExecuted, onlyIf, onlyIf, property, setActions, setAdditionalProperties, setConvention, setDependsOn, setDescription, setDidWork, setEnabled, setExecuted, setName, setOutputHandler, setProject, setProperty, 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, setProperty |
| Field Detail |
|---|
public static final java.lang.String FAILURES_OR_ERRORS_PROPERTY
public static final java.lang.String TEST_FRAMEWORK_DEFAULT_PROPERTY
| Constructor Detail |
|---|
public Test()
| Method Detail |
|---|
protected void executeTests()
public Test include(java.lang.String... includes)
include in interface PatternFilterableincludes - a vararg list of include patternssetIncludes(Iterable)public Test include(java.lang.Iterable<java.lang.String> includes)
include in interface PatternFilterableincludes - a Iterable providing more include patternssetIncludes(Iterable)public Test exclude(java.lang.String... excludes)
exclude in interface PatternFilterableexcludes - a vararg list of exclude patternssetExcludes(Iterable)public Test exclude(java.lang.Iterable<java.lang.String> excludes)
exclude in interface PatternFilterableexcludes - a Iterable providing new exclude patternssetExcludes(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 PatternFilterableinclude(String...)public Test setIncludes(java.lang.Iterable<java.lang.String> includes)
setIncludes in interface PatternFilterableincludes - The patterns listinclude(String...)public java.util.Set<java.lang.String> getExcludes()
getExcludes in interface PatternFilterableexclude(String...)public Test setExcludes(java.lang.Iterable<java.lang.String> excludes)
setExcludes in interface PatternFilterableexcludes - 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 getClasspath()
public void setClasspath(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 | ||||||||