|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.gradle.api.tasks.testing.TestFrameworkOptions
org.gradle.api.tasks.testing.testng.TestNGOptions
class TestNGOptions extends TestFrameworkOptions
Property Summary | |
---|---|
static String |
JAVADOC_ANNOTATIONS
|
static String |
JDK_ANNOTATIONS
|
Set |
excludeGroups
The set of groups to exclude. |
Set |
includeGroups
The set of groups to run. |
boolean |
javadocAnnotations
When true, Javadoc annotations are used for these tests. |
Set |
listeners
Fully qualified classes that are TestNG listeners (instances of org.testng.ITestListener or org.testng.IReporter). |
File |
outputDirectory
The location to write TestNG's output. |
String |
parallel
The parallel mode to use for running the tests - one of the following modes: methods, tests, classes or instances. |
String |
suiteName
Sets the default name of the test suite, if one is not specified in a suite XML file or in the source code. |
MarkupBuilder |
suiteXmlBuilder
|
List |
suiteXmlFiles
The suiteXmlFiles to use for running TestNG. |
StringWriter |
suiteXmlWriter
|
String |
testName
Sets the default name of the test, if one is not specified in a suite XML file or in the source code. |
List |
testResources
List of all directories containing Test sources. |
int |
threadCount
The number of threads to use for this run. |
boolean |
useDefaultListeners
Whether the default listeners and reporters should be used. |
Constructor Summary | |
TestNGOptions(File projectDir)
|
Method Summary | |
---|---|
TestNGOptions
|
excludeGroups(String... excludeGroups)
|
String
|
getAnnotations()
|
protected File
|
getProjectDir()
|
List
|
getSuites(File testSuitesDir)
|
TestNGOptions
|
includeGroups(String... includeGroups)
|
TestNGOptions
|
javadocAnnotations()
|
TestNGOptions
|
jdkAnnotations()
|
Object
|
methodMissing(String name, Object args)
|
Object
|
propertyMissing(String name)
|
void
|
setAnnotationsOnSourceCompatibility(JavaVersion sourceCompatibilityProp)
|
MarkupBuilder
|
suiteXmlBuilder()
|
void
|
suites(String... suiteFiles)
Add suite files by Strings. |
void
|
suites(File... suiteFiles)
Add suite files by File objects. |
TestNGOptions
|
useDefaultListeners()
|
TestNGOptions
|
useDefaultListeners(boolean useDefaultListeners)
|
Property Detail |
---|
static final String JAVADOC_ANNOTATIONS
static final String JDK_ANNOTATIONS
Set excludeGroups
Set includeGroups
boolean javadocAnnotations
Set listeners
apply plugin: 'java' test { useTestNG() { //creates emailable HTML file //this reporter typically ships with TestNG library listeners << 'org.testng.reporters.EmailableReporter' } }
@Incubating @OutputDirectory File outputDirectory
Defaults to the owning test task's location for writing the HTML report.
String parallel
String suiteName
MarkupBuilder suiteXmlBuilder
List suiteXmlFiles
StringWriter suiteXmlWriter
String testName
List testResources
int threadCount
boolean useDefaultListeners
apply plugin: 'java' test { useTestNG() { //report generation delegated to TestNG library: useDefaultListeners = true } //turn off Gradle's HTML report to avoid replacing the //reports generated by TestNG library: reports.html.enabled = false }Please refer to the documentation of your version of TestNG what are the default listeners. At the moment of writing this documentation, the default listeners are a set of reporters that generate: TestNG variant of HTML results, TestNG variant of XML results in JUnit format, emailable HTML test report, XML results in TestNG format.
Constructor Detail |
---|
TestNGOptions(File projectDir)
Method Detail |
---|
TestNGOptions excludeGroups(String... excludeGroups)
String getAnnotations()
protected File getProjectDir()
List getSuites(File testSuitesDir)
TestNGOptions includeGroups(String... includeGroups)
TestNGOptions javadocAnnotations()
TestNGOptions jdkAnnotations()
Object methodMissing(String name, Object args)
Object propertyMissing(String name)
void setAnnotationsOnSourceCompatibility(JavaVersion sourceCompatibilityProp)
MarkupBuilder suiteXmlBuilder()
void suites(String... suiteFiles)
void suites(File... suiteFiles)
TestNGOptions useDefaultListeners()
TestNGOptions useDefaultListeners(boolean useDefaultListeners)
Gradle API 1.12