Describe cómo se deben agregar los resultados cuando hay varios intentos presentes.
Valores de enumeración |
---|
MergeStrategy | ANY_FAIL_IS_FAIL Si falla una sola ejecución o un caso de prueba, el estado fallará pase lo que pase. |
MergeStrategy | ANY_PASS_IS_PASS Si se aprueba una ejecución única o un caso de prueba, consideraremos aprobados los resultados combinados. |
MergeStrategy | NO_MERGE La fusión no debe aplicarse y generará una excepción. |
MergeStrategy | ONE_TESTCASE_PASS_IS_PASS Si se supera un solo caso de prueba, consideraremos aprobado el resultado combinado. |
MergeStrategy | ONE_TESTRUN_PASS_IS_PASS Si se supera una sola ejecución de prueba, consideraremos aprobado el resultado de la ejecución combinada. |
Valores de enumeración
ANY_FAIL_IS_FAIL
public static final MergeStrategy ANY_FAIL_IS_FAIL
Si falla una sola ejecución o un caso de prueba, el estado fallará pase lo que pase.
ANY_PASS_IS_PASS
public static final MergeStrategy ANY_PASS_IS_PASS
Si se aprueba una ejecución única o un caso de prueba, consideraremos aprobados los resultados combinados.
NO_FUSIONAR
public static final MergeStrategy NO_MERGE
La fusión no debe aplicarse y generará una excepción.
ONE_TESTCASE_PASS_IS_PASS
public static final MergeStrategy ONE_TESTCASE_PASS_IS_PASS
Si se supera un solo caso de prueba, consideraremos aprobado el resultado combinado.
ONE_TESTRUN_PASS_IS_PASS
public static final MergeStrategy ONE_TESTRUN_PASS_IS_PASS
Si se supera una sola ejecución de prueba, consideraremos aprobado el resultado de la ejecución combinada.
Métodos públicos
getMergeStrategy
public static MergeStrategy getMergeStrategy (RetryStrategy retryStrategy)
Cree una estrategia de combinación basada en la estrategia de reintento.
Parámetros |
---|
retryStrategy | RetryStrategy |
El contenido y el código de ejemplo de esta página están sujetos a las licencias que se describen en la licencia de contenido. Java y OpenJDK son marcas registradas de Oracle o sus entidades asociadas.
Última actualización: 2023-12-01 (UTC).
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Me falta la información que necesito","missingTheInformationINeed","thumb-down"],["Es demasiado complicado o hay demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Está obsoleto","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema de muestras o código","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2023-12-01 (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 |"]]