public class DefaultTestRetryTaskExtension extends java.lang.Object implements TestRetryTaskExtension
TestRetryTaskExtension.ClassRetryCriteria, TestRetryTaskExtension.FilterNAME| Constructor and Description |
|---|
DefaultTestRetryTaskExtension(org.gradle.api.model.ObjectFactory objects) |
| Modifier and Type | Method and Description |
|---|---|
void |
classRetry(org.gradle.api.Action<? super TestRetryTaskExtension.ClassRetryCriteria> action)
The set of criteria specifying which test classes must be retried as a whole unit
if retries are enabled and the test class passes the configured filter.
|
void |
filter(org.gradle.api.Action<? super TestRetryTaskExtension.Filter> action)
The filter for specifying which tests may be retried.
|
TestRetryTaskExtension.ClassRetryCriteria |
getClassRetry()
The set of criteria specifying which test classes must be retried as a whole unit
if retries are enabled and the test class passes the configured filter.
|
org.gradle.api.provider.Property<java.lang.Boolean> |
getFailOnPassedAfterRetry()
Whether tests that initially fail and then pass on retry should fail the task.
|
TestRetryTaskExtension.Filter |
getFilter()
The filter for specifying which tests may be retried.
|
org.gradle.api.provider.Property<java.lang.Integer> |
getMaxFailures()
The maximum number of test failures that are allowed before retrying is disabled.
|
org.gradle.api.provider.Property<java.lang.Integer> |
getMaxRetries()
The maximum number of times to retry an individual test.
|
@Inject public DefaultTestRetryTaskExtension(org.gradle.api.model.ObjectFactory objects)
public org.gradle.api.provider.Property<java.lang.Boolean> getFailOnPassedAfterRetry()
TestRetryTaskExtension
This setting defaults to false,
which results in the task not failing if all tests pass on retry.
This setting has no effect if AbstractTestTask.getIgnoreFailures() is set to true.
getFailOnPassedAfterRetry in interface TestRetryTaskExtensionpublic org.gradle.api.provider.Property<java.lang.Integer> getMaxRetries()
TestRetryTaskExtension
This setting defaults to 0, which results in no retries.
Any value less than 1 disables retrying.
getMaxRetries in interface TestRetryTaskExtensionpublic org.gradle.api.provider.Property<java.lang.Integer> getMaxFailures()
TestRetryTaskExtensionThe count applies to each round of test execution. For example, if maxFailures is 5 and 4 tests initially fail and then 3 again on retry, this will not be considered too many failures and retrying will continue (if maxRetries > 1). If 5 or more tests were to fail initially then no retry would be attempted.
This setting defaults to 0, which results in no limit.
Any value less than 1 results in no limit.
getMaxFailures in interface TestRetryTaskExtensionpublic void filter(org.gradle.api.Action<? super TestRetryTaskExtension.Filter> action)
TestRetryTaskExtensionfilter in interface TestRetryTaskExtensionpublic TestRetryTaskExtension.Filter getFilter()
TestRetryTaskExtensiongetFilter in interface TestRetryTaskExtensionpublic TestRetryTaskExtension.ClassRetryCriteria getClassRetry()
TestRetryTaskExtensiongetClassRetry in interface TestRetryTaskExtensionpublic void classRetry(org.gradle.api.Action<? super TestRetryTaskExtension.ClassRetryCriteria> action)
TestRetryTaskExtensionclassRetry in interface TestRetryTaskExtension