open class TestNGOptions : TestFrameworkOptions
The TestNG specific test options.
TestNGOptions(projectDir: File) |
static val DEFAULT_CONFIG_FAILURE_POLICY: String |
open fun excludeGroups(vararg excludeGroups: String): TestNGOptions |
|
open fun getConfigFailurePolicy(): String
Option for what to do for other tests that use a configuration step when that step fails. Can be "skip" or "continue", defaults to "skip". |
|
open fun getExcludeGroups(): MutableSet<String>
The set of groups to exclude. |
|
open fun getGroupByInstances(): Boolean |
|
open fun getIncludeGroups(): MutableSet<String>
The set of groups to run. |
|
open fun getListeners(): MutableSet<String>
Fully qualified classes that are TestNG listeners (instances of org.testng.ITestListener or org.testng.IReporter). By default, the listeners set is empty. Configuring extra listener:
|
|
open fun getOutputDirectory(): File
The location to write TestNG's output. Defaults to the owning test task's location for writing the HTML report. |
|
open fun getParallel(): String
The parallel mode to use for running the tests - one of the following modes: methods, tests, classes or instances. Not required. If not present, parallel mode will not be selected |
|
open fun getPreserveOrder(): Boolean |
|
open fun getSuiteName(): String
Sets the default name of the test suite, if one is not specified in a suite XML file or in the source code. |
|
open fun getSuiteXmlBuilder(): MarkupBuilder |
|
open fun getSuiteXmlFiles(): MutableList<File>
The suiteXmlFiles to use for running TestNG. Note: The suiteXmlFiles can be used in conjunction with the suiteXmlBuilder. |
|
open fun getSuiteXmlWriter(): StringWriter |
|
open fun getSuites(testSuitesDir: File): MutableList<File> |
|
open fun getTestName(): String
Sets the default name of the test, if one is not specified in a suite XML file or in the source code. |
|
open fun getThreadCount(): Int
The number of threads to use for this run. Ignored unless the parallel mode is also specified |
|
open fun getUseDefaultListeners(): Boolean |
|
open fun includeGroups(vararg includeGroups: String): TestNGOptions |
|
open fun isGroupByInstances(): Boolean
Indicates whether the tests should be grouped by instances. Grouping by instances will result in resolving test method dependencies for each instance instead of running the dependees of all instances before running the dependants. Not required. If not present, the tests will not be grouped by instances. |
|
open fun isPreserveOrder(): Boolean
Indicates whether the tests should be run in deterministic order. Preserving the order guarantees that the complete test (including @BeforeXXX and @AfterXXX) is run in a test thread before the next test is run. Not required. If not present, the order will not be preserved. |
|
open fun isUseDefaultListeners(): Boolean
Whether the default listeners and reporters should be used. Since Gradle 1.4 it defaults to 'false' so that Gradle can own the reports generation and provide various improvements. This option might be useful for advanced TestNG users who prefer the reports generated by the TestNG library. If you cannot live without some specific TestNG reporter please use 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.
|
|
open fun methodMissing(name: String, args: Any): Any |
|
open fun propertyMissing(name: String): Any |
|
open fun setConfigFailurePolicy(configFailurePolicy: String): Unit |
|
open fun setExcludeGroups(excludeGroups: MutableSet<String>): Unit |
|
open fun setGroupByInstances(groupByInstances: Boolean): Unit |
|
open fun setIncludeGroups(includeGroups: MutableSet<String>): Unit |
|
open fun setListeners(listeners: MutableSet<String>): Unit |
|
open fun setOutputDirectory(outputDirectory: File): Unit |
|
open fun setParallel(parallel: String): Unit |
|
open fun setPreserveOrder(preserveOrder: Boolean): Unit |
|
open fun setSuiteName(suiteName: String): Unit |
|
open fun setSuiteXmlBuilder(suiteXmlBuilder: MarkupBuilder): Unit |
|
open fun setSuiteXmlFiles(suiteXmlFiles: MutableList<File>): Unit |
|
open fun setSuiteXmlWriter(suiteXmlWriter: StringWriter): Unit |
|
open fun setTestName(testName: String): Unit |
|
open fun setThreadCount(threadCount: Int): Unit |
|
open fun setUseDefaultListeners(useDefaultListeners: Boolean): Unit |
|
open fun suiteXmlBuilder(): MarkupBuilder |
|
open fun suites(vararg suiteFiles: String): Unit
Add suite files by Strings. Each suiteFile String should be a path relative to the project root. open fun suites(vararg suiteFiles: File): Unit
Add suite files by File objects. |
|
open fun useDefaultListeners(): TestNGOptions open fun useDefaultListeners(useDefaultListeners: Boolean): TestNGOptions |