Describes how the results should be aggregated when multiple attempts are present.
Enum values |
MergeStrategy |
ANY_FAIL_IS_FAIL
If a single run or test cases is failed, status will be failed no matter what.
|
MergeStrategy |
ANY_PASS_IS_PASS
If a single run or test cases is a pass we will consider the merged results passed.
|
MergeStrategy |
NO_MERGE
Merging should not be applied and will throw an exception.
|
MergeStrategy |
ONE_TESTCASE_PASS_IS_PASS
If a single test case pass then we will consider the merged result passed.
|
MergeStrategy |
ONE_TESTRUN_PASS_IS_PASS
If a single test run pass then we will consider the merged run result passed.
|
Enum values
ANY_FAIL_IS_FAIL
public static final MergeStrategy ANY_FAIL_IS_FAIL
If a single run or test cases is failed, status will be failed no matter what.
ANY_PASS_IS_PASS
public static final MergeStrategy ANY_PASS_IS_PASS
If a single run or test cases is a pass we will consider the merged results passed.
NO_MERGE
public static final MergeStrategy NO_MERGE
Merging should not be applied and will throw an exception.
ONE_TESTCASE_PASS_IS_PASS
public static final MergeStrategy ONE_TESTCASE_PASS_IS_PASS
If a single test case pass then we will consider the merged result passed.
ONE_TESTRUN_PASS_IS_PASS
public static final MergeStrategy ONE_TESTRUN_PASS_IS_PASS
If a single test run pass then we will consider the merged run result passed.
Public methods
getMergeStrategy
public static MergeStrategy getMergeStrategy (RetryStrategy retryStrategy)
Create a merge strategy based on the retry strategy.
Parameters |
retryStrategy |
RetryStrategy |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-04-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-28 UTC."],[],[],null,["# MergeStrategy\n=============\n\n\n`\npublic\n\nfinal\n\nenum\nMergeStrategy\n`\n\n\n`\n\n\n`\n\n`\n\nextends Enum\u003c`[MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html)`\u003e\n\n\n`\n\n`\n\n\n`\n\n|---|---|------------------------------------------|\n| java.lang.Object |||\n| ↳ | java.lang.Enum\\\u003c[com.android.tradefed.retry.MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html)\\\u003e ||\n| | ↳ | com.android.tradefed.retry.MergeStrategy |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDescribes how the results should be aggregated when multiple attempts are present.\n\nSummary\n-------\n\n| ### Enum values ||\n|-----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ANY_FAIL_IS_FAIL` If a single run or test cases is failed, status will be failed no matter what. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ANY_PASS_IS_PASS` If a single run or test cases is a pass we will consider the merged results passed. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `NO_MERGE` Merging should not be applied and will throw an exception. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ONE_TESTCASE_PASS_IS_PASS` If a single test case pass then we will consider the merged result passed. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ONE_TESTRUN_PASS_IS_PASS` If a single test run pass then we will consider the merged run result passed. |\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | ` `[getMergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html#getMergeStrategy(com.android.tradefed.retry.RetryStrategy))`(`[RetryStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/RetryStrategy.html)` retryStrategy) ` Create a merge strategy based on the retry strategy. |\n| ` static `[MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | ` `[valueOf](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html#valueOf(java.lang.String))`(String name) ` |\n| ` static final `[MergeStrategy[]](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | ` `[values](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html#values())`() ` |\n\nEnum values\n-----------\n\n### ANY_FAIL_IS_FAIL\n\n```\npublic static final MergeStrategy ANY_FAIL_IS_FAIL\n```\n\nIf a single run or test cases is failed, status will be failed no matter what.\n\n\u003cbr /\u003e\n\n### ANY_PASS_IS_PASS\n\n```\npublic static final MergeStrategy ANY_PASS_IS_PASS\n```\n\nIf a single run or test cases is a pass we will consider the merged results passed.\n\n\u003cbr /\u003e\n\n### NO_MERGE\n\n```\npublic static final MergeStrategy NO_MERGE\n```\n\nMerging should not be applied and will throw an exception.\n\n\u003cbr /\u003e\n\n### ONE_TESTCASE_PASS_IS_PASS\n\n```\npublic static final MergeStrategy ONE_TESTCASE_PASS_IS_PASS\n```\n\nIf a single test case pass then we will consider the merged result passed.\n\n\u003cbr /\u003e\n\n### ONE_TESTRUN_PASS_IS_PASS\n\n```\npublic static final MergeStrategy ONE_TESTRUN_PASS_IS_PASS\n```\n\nIf a single test run pass then we will consider the merged run result passed.\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getMergeStrategy\n\n```\npublic static MergeStrategy getMergeStrategy (RetryStrategy retryStrategy)\n```\n\nCreate a merge strategy based on the retry strategy.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------|------------------------|\n| `retryStrategy` | `RetryStrategy` \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------|--------|\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | \u003cbr /\u003e |\n\n### valueOf\n\n```\npublic static MergeStrategy valueOf (String name)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|-----------------|\n| `name` | `String` \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------|--------|\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | \u003cbr /\u003e |\n\n### values\n\n```\npublic static final MergeStrategy[] values ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------------------------------------|--------|\n| [MergeStrategy[]](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | \u003cbr /\u003e |"]]