# 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
setConfigFailurePolicy
Link copied to clipboard
open fun setConfigFailurePolicy(configFailurePolicy: String)
setExcludeGroups
Link copied to clipboard
open fun setExcludeGroups(excludeGroups: Set<String>)
setGroupByInstances
Link copied to clipboard
open fun setGroupByInstances(groupByInstances: Boolean)
setIncludeGroups
Link copied to clipboard
open fun setIncludeGroups(includeGroups: Set<String>)
setListeners
Link copied to clipboard
open fun setListeners(listeners: Set<String>)
setOutputDirectory
Link copied to clipboard
open fun setOutputDirectory(outputDirectory: File)
setParallel
Link copied to clipboard
open fun setParallel(@Nullable parallel: @Nullable String)
setPreserveOrder
Link copied to clipboard
open fun setPreserveOrder(preserveOrder: Boolean)
setSuiteName
Link copied to clipboard
open fun setSuiteName(suiteName: String)
setSuiteXmlBuilder
Link copied to clipboard
open fun setSuiteXmlBuilder(suiteXmlBuilder: MarkupBuilder)
setSuiteXmlFiles
Link copied to clipboard
open fun setSuiteXmlFiles(suiteXmlFiles: List<File>)
setSuiteXmlWriter
Link copied to clipboard
open fun setSuiteXmlWriter(suiteXmlWriter: StringWriter)
setTestName
Link copied to clipboard
open fun setTestName(testName: String)
setThreadCount
Link copied to clipboard
open fun setThreadCount(threadCount: Int)
setThreadPoolFactoryClass
Link copied to clipboard
@Incubating
open fun setThreadPoolFactoryClass(threadPoolFactoryClass: String)
Sets a custom threadPoolExecutorFactory class.
setUseDefaultListeners
Link copied to clipboard
open fun setUseDefaultListeners(useDefaultListeners: Boolean)
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