# TestNGOptions

abstract class TestNGOptions : TestFrameworkOptions(source)

The TestNG specific test options.

## Constructors

TestNGOptions
Link copied to clipboard
@Inject
constructor(projectLayout: ProjectLayout, objects: ObjectFactory)

## Properties

DEFAULT_CONFIG_FAILURE_POLICY
Link copied to clipboard
val DEFAULT_CONFIG_FAILURE_POLICY: String = "skip"
suiteXmlBuilder
Link copied to clipboard
@get:Internal
open val suiteXmlBuilder: Property<MarkupBuilder>
suiteXmlWriter
Link copied to clipboard
@get:Internal
open val suiteXmlWriter: Property<StringWriter>

## Functions

copyFrom
Link copied to clipboard
open fun copyFrom(other: TestNGOptions)
Copies the options from the source options into the current one.
excludeGroups
Link copied to clipboard
open fun excludeGroups(excludeGroups: Array<String>): TestNGOptions
getConfigFailurePolicy
Link copied to clipboard
@Internal
abstract fun getConfigFailurePolicy(): Property<String>
Option for what to do for other tests that use a configuration step when that step fails.
getExcludeGroups
Link copied to clipboard
@Input
abstract fun getExcludeGroups(): SetProperty<String>
The set of groups to exclude.
getGroupByInstances
Link copied to clipboard
@Internal
abstract fun getGroupByInstances(): Property<Boolean>
Indicates whether the tests should be grouped by instances.
getIncludeGroups
Link copied to clipboard
@Input
abstract fun getIncludeGroups(): SetProperty<String>
The set of groups to run.
getIsGroupByInstances
Link copied to clipboard
@Internal
open fun getIsGroupByInstances(): Property<Boolean>
getIsPreserveOrder
Link copied to clipboard
@Internal
open fun getIsPreserveOrder(): Property<Boolean>
getIsUseDefaultListeners
Link copied to clipboard
@Internal
open fun getIsUseDefaultListeners(): Property<Boolean>
getListeners
Link copied to clipboard
@Internal
abstract fun getListeners(): SetProperty<String>
Fully qualified classes that are TestNG listeners (instances of org.testng.ITestListener or org.testng.IReporter).
getOutputDirectory
Link copied to clipboard
@OutputDirectory
abstract fun getOutputDirectory(): DirectoryProperty
The location to write TestNG's output.
getParallel
Link copied to clipboard
@Internal
abstract fun getParallel(): Property<String>
The parallel mode to use for running the tests - one of the following modes: methods, tests, classes or instances.
getPreserveOrder
Link copied to clipboard
@Internal
abstract fun getPreserveOrder(): Property<Boolean>
Indicates whether the tests should be run in deterministic order.
getSuiteName
Link copied to clipboard
@Internal
abstract fun getSuiteName(): Property<String>
Sets the default name of the test suite, if one is not specified in a suite XML file or in the source code.
getSuites
Link copied to clipboard
open fun getSuites(testSuitesDir: File): List<File>
getSuiteThreadPoolSize
Link copied to clipboard
@Internal
@Incubating
abstract fun getSuiteThreadPoolSize(): Property<Integer>
The number of XML suites will run parallel
getSuiteXmlFiles
Link copied to clipboard
@InputFiles
@PathSensitive(value = PathSensitivity.NONE)
abstract fun getSuiteXmlFiles(): ConfigurableFileCollection
The suiteXmlFiles to use for running TestNG.
getTestName
Link copied to clipboard
@Internal
abstract fun getTestName(): Property<String>
Sets the default name of the test, if one is not specified in a suite XML file or in the source code.
getThreadCount
Link copied to clipboard
@Internal
abstract fun getThreadCount(): Property<Integer>
The number of threads to use for this run.
getThreadPoolFactoryClass
Link copied to clipboard
@Internal
@Incubating
abstract fun getThreadPoolFactoryClass(): Property<String>
ThreadPoolExecutorFactory class used by TestNG
getUseDefaultListeners
Link copied to clipboard
@Internal
abstract fun getUseDefaultListeners(): Property<Boolean>
Whether the default listeners and reporters should be used.
includeGroups
Link copied to clipboard
open fun includeGroups(includeGroups: Array<String>): TestNGOptions
methodMissing
Link copied to clipboard
open fun methodMissing(name: String, args: Any): Any
propertyMissing
Link copied to clipboard
open fun propertyMissing(name: String): Any
suites
Link copied to clipboard
open fun suites(suiteFiles: Array<File>)
Add suite files by File objects.
open fun suites(suiteFiles: Array<String>)
Add suite files by Strings.
suiteXmlBuilder
Link copied to clipboard
open fun suiteXmlBuilder(): MarkupBuilder
useDefaultListeners
Link copied to clipboard
open fun useDefaultListeners(): TestNGOptions
open fun useDefaultListeners(useDefaultListeners: Boolean): TestNGOptions