@Incubating open class XCTest : AbstractTestTask
Executes XCTest tests. Test are always run in a single execution.
Since
4.5
XCTest()
Executes XCTest tests. Test are always run in a single execution. |
open fun getRunScriptFile(): RegularFileProperty
Returns test suite bundle or executable location |
|
open fun getTestInstallDirectory(): DirectoryProperty
Sets the test suite bundle or executable location |
|
open fun getWorkingDirectory(): DirectoryProperty
Returns the working directory property for this test. |
|
open fun setTestNameIncludePatterns(testNamePattern: MutableList<String>): XCTest
{@inheritDoc} |
open fun addTestListener(listener: TestListener): Unit
Registers a test listener with this task. Consider also the following handy methods for quicker hooking into test execution: This listener will NOT be notified of tests executed by other tasks. To get that behavior, use |
|
open fun addTestOutputListener(listener: TestOutputListener): Unit
Registers a output listener with this task. Quicker way of hooking into output events is using the |
|
open fun afterSuite(closure: Closure<Any>): Unit
Adds a closure to be notified after a test suite has executed. A TestDescriptor and TestResult instance are passed to the closure as a parameter. This method is also called after all test suites are executed. The provided descriptor will have a null parent suite. |
|
open fun afterTest(closure: Closure<Any>): Unit
Adds a closure to be notified after a test has executed. A TestDescriptor and TestResult instance are passed to the closure as a parameter. |
|
open fun beforeSuite(closure: Closure<Any>): Unit
Adds a closure to be notified before a test suite is executed. A TestDescriptor instance is passed to the closure as a parameter. This method is also called before any test suites are executed. The provided descriptor will have a null parent suite. |
|
open fun beforeTest(closure: Closure<Any>): Unit
Adds a closure to be notified before a test is executed. A TestDescriptor instance is passed to the closure as a parameter. |
|
open fun executeTests(): Unit |
|
open fun getBinResultsDir(): File
Returns the root folder for the test results in internal binary format. |
|
open fun getBinaryResultsDirectory(): DirectoryProperty
Returns the root directory property for the test results in internal binary format. |
|
open fun getFilter(): TestFilter
Allows filtering tests for execution. |
|
open fun getIgnoreFailures(): Boolean
{@inheritDoc} |
|
open fun getReports(): TestTaskReports
The reports that this task potentially produces. |
|
open fun getTestLogging(): TestLoggingContainer
Allows to set options related to which test events are logged to the console, and on which detail level. For example, to show more information about exceptions use: For further information see TestLoggingContainer.
|
|
open fun onOutput(closure: Closure<Any>): Unit
Adds a closure to be notified when output from the test received. A TestDescriptor and TestOutputEvent instance are passed to the closure as a parameter.
|
|
open fun removeTestListener(listener: TestListener): Unit
Unregisters a test listener with this task. This method will only remove listeners that were added by calling |
|
open fun removeTestOutputListener(listener: TestOutputListener): Unit
Unregisters a test output listener with this task. This method will only remove listeners that were added by calling |
|
open fun reports(closure: Closure<Any>): TestTaskReports open fun reports(configureAction: Action<in TestTaskReports>): TestTaskReports
Configures the reports that this task potentially produces. |
|
open fun setBinResultsDir(binResultsDir: File): Unit
Sets the root folder for the test results in internal binary format. |
|
open fun setIgnoreFailures(ignoreFailures: Boolean): Unit
{@inheritDoc} |
|
open fun testLogging(closure: Closure<Any>): Unit open fun testLogging(action: Action<in TestLoggingContainer>): Unit
Allows configuring the logging of the test execution, for example log eagerly the standard output, etc.
|