Class DefaultTestRetryTaskExtension
- All Implemented Interfaces:
TestRetryTaskExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.testretry.TestRetryTaskExtension
TestRetryTaskExtension.ClassRetryCriteria, TestRetryTaskExtension.Filter -
Field Summary
Fields inherited from interface org.gradle.testretry.TestRetryTaskExtension
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclassRetry(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.voidfilter(org.gradle.api.Action<? super TestRetryTaskExtension.Filter> action) The filter for specifying which tests may be retried.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<Boolean>Whether tests that initially fail and then pass on retry should fail the task.org.gradle.api.provider.Property<Boolean>Whether tests that initially fail and then are skipped on retry should fail the task.The filter for specifying which tests may be retried.org.gradle.api.provider.Property<Integer>The maximum number of test failures that are allowed before retrying is disabled.org.gradle.api.provider.Property<Integer>The maximum number of times to retry an individual test.
-
Constructor Details
-
DefaultTestRetryTaskExtension
@Inject public DefaultTestRetryTaskExtension(org.gradle.api.model.ObjectFactory objects)
-
-
Method Details
-
getFailOnPassedAfterRetry
Description copied from interface:TestRetryTaskExtensionWhether tests that initially fail and then pass on retry should fail the task.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.- Specified by:
getFailOnPassedAfterRetryin interfaceTestRetryTaskExtension- Returns:
- whether tests that initially fails and then pass on retry should fail the task
-
getFailOnSkippedAfterRetry
Description copied from interface:TestRetryTaskExtensionWhether tests that initially fail and then are skipped on retry should fail the task.This setting defaults to
true(for backward compatibility), which results in the task failing if any of tests skip on retry.This setting has no effect if
AbstractTestTask.getIgnoreFailures()is set to true.- Specified by:
getFailOnSkippedAfterRetryin interfaceTestRetryTaskExtension- Returns:
- whether tests that initially fails and then are skipped on retry should fail the task
-
getMaxRetries
Description copied from interface:TestRetryTaskExtensionThe maximum number of times to retry an individual test.This setting defaults to
0, which results in no retries. Any value less than 1 disables retrying.- Specified by:
getMaxRetriesin interfaceTestRetryTaskExtension- Returns:
- the maximum number of times to retry an individual test
-
getMaxFailures
Description copied from interface:TestRetryTaskExtensionThe maximum number of test failures that are allowed before retrying is disabled.The 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.- Specified by:
getMaxFailuresin interfaceTestRetryTaskExtension- Returns:
- the maximum number of test failures that are allowed before retrying is disabled
-
filter
Description copied from interface:TestRetryTaskExtensionThe filter for specifying which tests may be retried.- Specified by:
filterin interfaceTestRetryTaskExtension
-
getFilter
Description copied from interface:TestRetryTaskExtensionThe filter for specifying which tests may be retried.- Specified by:
getFilterin interfaceTestRetryTaskExtension
-
getClassRetry
Description copied from interface:TestRetryTaskExtensionThe 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.- Specified by:
getClassRetryin interfaceTestRetryTaskExtension
-
classRetry
public void classRetry(org.gradle.api.Action<? super TestRetryTaskExtension.ClassRetryCriteria> action) Description copied from interface:TestRetryTaskExtensionThe 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.- Specified by:
classRetryin interfaceTestRetryTaskExtension
-