Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.api.tasks.testing.testng
Class TestNGOptions

    java.lang.Object
      org.gradle.api.tasks.compile.AbstractOptions
          org.gradle.api.tasks.testing.AbstractTestFrameworkOptions
              org.gradle.api.tasks.testing.testng.TestNGOptions

    class TestNGOptions
    extends AbstractTestFrameworkOptions

author:
  Tom Eyckmans

Property Summary
`static java.lang.String` | `JAVADOC_ANNOTATIONS`
`static java.lang.String` | `JDK_ANNOTATIONS`
`java.lang.String` | `annotations` Either the string "JDK" or "Javadoc".
`boolean` | `dumpCommand` Print the TestNG launcher command.
`boolean` | `enableAssert` Enables JDK 1.4 assertion.
`java.util.Map` | `environment`
`java.util.List` | `excludeGroups` The list of groups to exclude, separated by spaces or commas.
`java.util.List` | `includeGroups` The name of a property to set in the event of a failure.
`java.lang.String` | `jvm` The JVM to use, which will be run by Runtime.exec() Default to 'java'
`java.util.List` | `jvmArgs`
`java.util.List` | `listeners` A comma or space-separated list of fully qualified classes that are TestNG listeners (for example org.testng.ITestListener or org.testng.IReporter) Not required.
`java.lang.String` | `parallel` The parallel mode to use for running the tests - either methods or tests.
`java.lang.String` | `skippedProperty` Directory for reports output.
`java.lang.String` | `suiteName` The directory where the ant task should change to before running TestNG.
`java.lang.String` | `suiteRunnerClass` A PATH-like structure for JDK 1.4 tests (using JavaDoc-like annotations)
`MarkupBuilder` | `suiteXmlBuilder`
`java.util.List` | `suiteXmlFiles` The suiteXmlFiles to use for running TestNG.
`java.io.StringWriter` | `suiteXmlWriter`
`java.util.Map` | `systemProperties`
`java.lang.String` | `testName` Sets the default name of the test, if one is not specified in a suite xml file or in the source code.
`java.util.List` | `testResources` A reference to a FileSet structure of the test classes to be run.
`int` | `threadCount` The number of threads to use for this run.
`long` | `timeOut` Path to a jar containing tests and a suite definition.

Constructor Summary
`TestNGOptions(TestNGTestFramework testngTestFramework, java.io.File projectDir)`

Method Summary
`TestNGOptions` | `dumpCommand()`
`TestNGOptions` | `excludeGroups(java.lang.String excludeGroups)`
`java.util.List` | `excludedFieldsFromOptionMap()`
`java.util.Map` | `fieldName2AntMap()`
`java.util.List` | `getSuites(java.io.File testSuitesDir)`
`TestNGOptions` | `includeGroups(java.lang.String includeGroups)`
`TestNGOptions` | `javadocAnnotations()`
`TestNGOptions` | `jdkAnnotations()`
`def` | `methodMissing(java.lang.String name, def args)`
`java.util.Map` | `optionMap()`
`def` | `propertyMissing(java.lang.String name)`
`void` | `setAnnotationsOnSourceCompatibility(JavaVersion sourceCompatibilityProp)`
`MarkupBuilder` | `suiteXmlBuilder()`
`void` | `suites(java.lang.String suiteFiles)` Add suite files by Strings.
`void` | `suites(java.io.File suiteFiles)` Add suite files by File objects.

Methods inherited from class AbstractTestFrameworkOptions
methodMissing, propertyMissing

Methods inherited from class AbstractOptions
addValueToMapIfNotNull, isOptionField

Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll

Property Detail

### JAVADOC_ANNOTATIONS

    public static final java.lang.String JAVADOC_ANNOTATIONS

### JDK_ANNOTATIONS

    public static final java.lang.String JDK_ANNOTATIONS

### annotations

    java.lang.String annotations

  Either the string "JDK" or "Javadoc". Defines which kind of annotations are used in these tests. If you use "Javadoc", you will also need to specify "sourcedir". Not required. Defaults to "JDK" if you're using the JDK 5 jar and to "Javadoc" if you're using the JDK 1.4 jar.

### dumpCommand

    boolean dumpCommand

  Print the TestNG launcher command. Not required. Defaults to false

### enableAssert

    boolean enableAssert

  Enables JDK 1.4 assertion. Not required. Defaults to true

### environment

    java.util.Map environment

### excludeGroups

    java.util.List excludeGroups

  The list of groups to exclude, separated by spaces or commas.

### includeGroups

    java.util.List includeGroups

  The name of a property to set in the event of a failure. It is used only if the haltonfailure is not set. Not required.

### jvm

    java.lang.String jvm

  The JVM to use, which will be run by Runtime.exec() Default to 'java'

### jvmArgs

    java.util.List jvmArgs

### listeners

    java.util.List listeners

  A comma or space-separated list of fully qualified classes that are TestNG listeners (for example org.testng.ITestListener or org.testng.IReporter) Not required.

### parallel

    java.lang.String parallel

  The parallel mode to use for running the tests - either methods or tests. Not required. If not present, parallel mode will not be selected

### skippedProperty

    java.lang.String skippedProperty

  Directory for reports output.

### suiteName

    java.lang.String suiteName

  The directory where the ant task should change to before running TestNG.

### suiteRunnerClass

    java.lang.String suiteRunnerClass

  A PATH-like structure for JDK 1.4 tests (using JavaDoc-like annotations)

### suiteXmlBuilder

    MarkupBuilder suiteXmlBuilder

### suiteXmlFiles

    java.util.List suiteXmlFiles

  The suiteXmlFiles to use for running TestNG. Note: The suiteXmlFiles can be used in conjunction with the suiteXmlBuilder.

### suiteXmlWriter

    java.io.StringWriter suiteXmlWriter

### systemProperties

    java.util.Map systemProperties

### testName

    java.lang.String testName

  Sets the default name of the test, if one is not specified in a suite xml file or in the source code. Not required. Defaults to "Ant test"

### testResources

    java.util.List testResources

  A reference to a FileSet structure of the test classes to be run.

### threadCount

    int threadCount

  The number of threads to use for this run. Ignored unless the parallel mode is also specified

### timeOut

    long timeOut

  Path to a jar containing tests and a suite definition.

Constructor Detail

### TestNGOptions

    public TestNGOptions(TestNGTestFramework testngTestFramework, java.io.File projectDir)

Method Detail

### dumpCommand

    TestNGOptions dumpCommand()

### excludeGroups

    public TestNGOptions excludeGroups(java.lang.String excludeGroups)

### excludedFieldsFromOptionMap

    java.util.List excludedFieldsFromOptionMap()

### fieldName2AntMap

    java.util.Map fieldName2AntMap()

### getSuites

    java.util.List getSuites(java.io.File testSuitesDir)

### includeGroups

    public TestNGOptions includeGroups(java.lang.String includeGroups)

### javadocAnnotations

    TestNGOptions javadocAnnotations()

### jdkAnnotations

    TestNGOptions jdkAnnotations()

### methodMissing

    public def methodMissing(java.lang.String name, def args)

### optionMap

    java.util.Map optionMap()

### propertyMissing

    public def propertyMissing(java.lang.String name)

### setAnnotationsOnSourceCompatibility

    void setAnnotationsOnSourceCompatibility(JavaVersion sourceCompatibilityProp)

### suiteXmlBuilder

    MarkupBuilder suiteXmlBuilder()

### suites

    void suites(java.lang.String suiteFiles)

  Add suite files by Strings. Each suiteFile String should be a path relative to the project root.

### suites

    void suites(java.io.File suiteFiles)

  Add suite files by File objects.

Groovy Documentation