Class FlakyTestDetectorFunctions
- java.lang.Object
-
- jetbrains.buildServer.web.functions.flakyTestDetector.FlakyTestDetectorFunctions
-
public final class FlakyTestDetectorFunctions extends Object
Flaky Test Detector functions library.
- Since:
- 10.0
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]getEnvironmentDependentReasons(long testNameId)Returns the environment depend reasons for a given test, or a zero-length array if the test doesn't depend on environment.static StringgetEnvironmentDependentReasonsStringified(long testNameId, CharSequence delimiter)Returns the environment depend reasons (in a plain text format, separated with the delimiter) for a given test, ornullif the test doesn't depends on the environment.static String[]getFlakyReasons(long testNameId)Returns the flaky reasons for a given test, or a zero-length array if the test is not flaky.static String[]getFlakyReasons(long testNameId, String buildTypeId)Returns the flaky reasons for a given test, or a zero-length array if the test is not flaky.static StringgetFlakyReasonsStringified(long testNameId, CharSequence delimiter)Returns the flaky reasons (in a plain text format, separated with the delimiter) for a given test, ornullif the test is not flaky.static booleanisEnvironmentDependent(long testNameId)Returnstrueif the test specified bytestNameIddepends on environment,falseotherwise.static booleanisFlaky(long testNameId)Returnstrueif the test specified bytestNameIdis flaky,falseotherwise.static booleanisFlaky(long testNameId, String buildTypeId)static booleanisFlakyInProject(long testNameId, String projectExternalId)
-
-
-
Method Detail
-
isFlaky
public static boolean isFlaky(long testNameId)
Returns
trueif the test specified bytestNameIdis flaky,falseotherwise.If Flaky Test Detector plug-in is not installed, returns
false.- Parameters:
testNameId- the uniquename_idof the test.- Returns:
- whether the test specified by
testNameIdis flaky.
-
isEnvironmentDependent
public static boolean isEnvironmentDependent(long testNameId)
Returns
trueif the test specified bytestNameIddepends on environment,falseotherwise.If Flaky Test Detector plug-in is not installed, returns
false.- Parameters:
testNameId- the uniquename_idof the test.- Returns:
- whether the test specified by
testNameIdis flaky.
-
isFlaky
public static boolean isFlaky(long testNameId, @NotNull String buildTypeId)- Parameters:
testNameId- the uniqueidof the testbuildTypeId- the unique internalidof build configuration- Returns:
- true if the test specified by
testNameIdis flaky in specified build configuration otherwise false
-
isFlakyInProject
public static boolean isFlakyInProject(long testNameId, @Nullable String projectExternalId)- Parameters:
testNameId- the uniqueidof the testprojectExternalId- external id of project- Returns:
- true if specified test is flaky at least in one build configuration which belongs to current project
-
getFlakyReasonsStringified
@Nullable public static String getFlakyReasonsStringified(long testNameId, @NotNull CharSequence delimiter)
Returns the flaky reasons (in a plain text format, separated with the delimiter) for a given test, or
nullif the test is not flaky.If Flaky Test Detector plug-in is not installed, returns
null.- Parameters:
testNameId- the uniquename_idof the test.delimiter- the delimiter that separates each flaky reason.- Returns:
- the flaky reasons in a plain text format for a given test.
-
getEnvironmentDependentReasonsStringified
@Nullable public static String getEnvironmentDependentReasonsStringified(long testNameId, @NotNull CharSequence delimiter)
Returns the environment depend reasons (in a plain text format, separated with the delimiter) for a given test, or
nullif the test doesn't depends on the environment.If Flaky Test Detector plug-in is not installed, returns
null.- Parameters:
testNameId- the uniquename_idof the test.delimiter- the delimiter that separates each flaky reason.- Returns:
- the flaky reasons in a plain text format for a given test.
-
getEnvironmentDependentReasons
@NotNull public static String[] getEnvironmentDependentReasons(long testNameId)
Returns the environment depend reasons for a given test, or a zero-length array if the test doesn't depend on environment.
If Flaky Test Detector plug-in is not installed, returns a zero-length array.
- Parameters:
testNameId- the uniquename_idof the test.- Returns:
- the flaky reasons for a given test.
-
getFlakyReasons
@NotNull public static String[] getFlakyReasons(long testNameId, @NotNull String buildTypeId)
Returns the flaky reasons for a given test, or a zero-length array if the test is not flaky.
If Flaky Test Detector plug-in is not installed, returns a zero-length array.
- Parameters:
testNameId- the uniquename_idof the test.buildTypeId- the unique internalidof build configuration- Returns:
- the flaky reasons for a given test.
-
getFlakyReasons
@NotNull public static String[] getFlakyReasons(long testNameId)
Returns the flaky reasons for a given test, or a zero-length array if the test is not flaky.
If Flaky Test Detector plug-in is not installed, returns a zero-length array.
- Parameters:
testNameId- the uniquename_idof the test.- Returns:
- the flaky reasons for a given test.
-
-