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 String
getEnvironmentDependentReasonsStringified(long testNameId, CharSequence delimiter)
Returns the environment depend reasons (in a plain text format, separated with the delimiter) for a given test, ornull
if 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 String
getFlakyReasonsStringified(long testNameId, CharSequence delimiter)
Returns the flaky reasons (in a plain text format, separated with the delimiter) for a given test, ornull
if the test is not flaky.static boolean
isEnvironmentDependent(long testNameId)
Returnstrue
if the test specified bytestNameId
depends on environment,false
otherwise.static boolean
isFlaky(long testNameId)
Returnstrue
if the test specified bytestNameId
is flaky,false
otherwise.static boolean
isFlaky(long testNameId, String buildTypeId)
static boolean
isFlakyInProject(long testNameId, String projectExternalId)
-
-
-
Method Detail
-
isFlaky
public static boolean isFlaky(long testNameId)
Returns
true
if the test specified bytestNameId
is flaky,false
otherwise.If Flaky Test Detector plug-in is not installed, returns
false
.- Parameters:
testNameId
- the uniquename_id
of the test.- Returns:
- whether the test specified by
testNameId
is flaky.
-
isEnvironmentDependent
public static boolean isEnvironmentDependent(long testNameId)
Returns
true
if the test specified bytestNameId
depends on environment,false
otherwise.If Flaky Test Detector plug-in is not installed, returns
false
.- Parameters:
testNameId
- the uniquename_id
of the test.- Returns:
- whether the test specified by
testNameId
is flaky.
-
isFlaky
public static boolean isFlaky(long testNameId, @NotNull String buildTypeId)
- Parameters:
testNameId
- the uniqueid
of the testbuildTypeId
- the unique internalid
of build configuration- Returns:
- true if the test specified by
testNameId
is flaky in specified build configuration otherwise false
-
isFlakyInProject
public static boolean isFlakyInProject(long testNameId, @Nullable String projectExternalId)
- Parameters:
testNameId
- the uniqueid
of 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
null
if the test is not flaky.If Flaky Test Detector plug-in is not installed, returns
null
.- Parameters:
testNameId
- the uniquename_id
of 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
null
if the test doesn't depends on the environment.If Flaky Test Detector plug-in is not installed, returns
null
.- Parameters:
testNameId
- the uniquename_id
of 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_id
of 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_id
of the test.buildTypeId
- the unique internalid
of 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_id
of the test.- Returns:
- the flaky reasons for a given test.
-
-