Package jetbrains.buildServer.serverSide
Class BuildStatisticsOptions
- java.lang.Object
-
- jetbrains.buildServer.serverSide.BuildStatisticsOptions
-
public class BuildStatisticsOptions extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static BuildStatisticsOptions
ALL_TESTS_NO_DETAILS
Options allow to search for any test in the build without specifying details, does not load test history so isNewFailure should not be calledstatic int
COMPILATION_ERRORS
static int
FIRST_FAILED_IN_BUILD
static int
FIXED_IN_BUILD
static int
IGNORE_DB_CACHE
If set, the statistics will be calculated without checking the failed_tests cache tablestatic int
IGNORED_TESTS
static int
NO_GROUPING_BY_NAME
If set, returned STestRuns are not united by common name, i.e if there are multiple test runs of the test with the same name, there will be multiple STestRuns in the result, each having getInvocationCount=1static int
NO_TEST_HISTORY
If set, returned STestRuns do not preload isNewFailure() call results, i.e.static int
PASSED_TESTS
-
Constructor Summary
Constructors Constructor Description BuildStatisticsOptions()
Default constructor.BuildStatisticsOptions(int optionsMask, int maxNumberOfTestsStacktracesToLoad)
This constructor allows to specify exact options to be used
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsOptions(BuildStatisticsOptions otherOptions)
Deprecated.in 2019.2boolean
equals(Object o)
int
getMaxNumberOfCompileErrorsToLoad()
int
getMaxNumberOfTestsStacktracesToLoad()
Returns maximum number of tests for which to load stacktraces, if -1 - all stacktraces will be loadedint
hashCode()
boolean
isGroupTestsByName()
boolean
isLoadCompilationErrors()
Whether to load compilation errorsboolean
isLoadFirstFailedIn()
boolean
isLoadFixedIn()
boolean
isLoadIgnoredTests()
boolean
isLoadPassedTests()
boolean
isSet(int flagOptions)
boolean
isTestHistorySkipped()
void
setLoadCompilationErrors(boolean loadCompilationErrors)
Sets whether to load compilation errors (true by default)void
setLoadFirstFailedIn(boolean loadFirstFailedIn)
void
setLoadFixedIn(boolean loadFixedIn)
void
setMaxNumberOfCompileErrorsToLoad(int maxNumberOfCompileErrorsToLoad)
void
setMaxNumberOfTestsStacktracesToLoad(int maxNumberOfTestsStacktracesToLoad)
Sets maximum number of tests stacktraces to load, set to -1 to load all stacktraces.String
toString()
-
-
-
Field Detail
-
COMPILATION_ERRORS
public static final int COMPILATION_ERRORS
- See Also:
- Constant Field Values
-
FIRST_FAILED_IN_BUILD
public static final int FIRST_FAILED_IN_BUILD
- See Also:
- Constant Field Values
-
FIXED_IN_BUILD
public static final int FIXED_IN_BUILD
- See Also:
- Constant Field Values
-
PASSED_TESTS
public static final int PASSED_TESTS
- See Also:
- Constant Field Values
-
IGNORED_TESTS
public static final int IGNORED_TESTS
- See Also:
- Constant Field Values
-
NO_GROUPING_BY_NAME
public static final int NO_GROUPING_BY_NAME
If set, returned STestRuns are not united by common name, i.e if there are multiple test runs of the test with the same name, there will be multiple STestRuns in the result, each having getInvocationCount=1- Since:
- 9.0
- See Also:
- Constant Field Values
-
NO_TEST_HISTORY
public static final int NO_TEST_HISTORY
If set, returned STestRuns do not preload isNewFailure() call results, i.e. no history data are loaded. Also, if set,FIRST_FAILED_IN_BUILD
andFIXED_IN_BUILD
parameters must not be set - stats will result in IllegalArgumentException- Since:
- 2020.2
- See Also:
- Constant Field Values
-
IGNORE_DB_CACHE
public static final int IGNORE_DB_CACHE
If set, the statistics will be calculated without checking the failed_tests cache table- Since:
- 2020.2
- See Also:
- Constant Field Values
-
ALL_TESTS_NO_DETAILS
public static final BuildStatisticsOptions ALL_TESTS_NO_DETAILS
Options allow to search for any test in the build without specifying details, does not load test history so isNewFailure should not be called- Since:
- 9.0
-
-
Constructor Detail
-
BuildStatisticsOptions
public BuildStatisticsOptions()
Default constructor. By default all available data is loaded, including all stacktraces for all failed tests. Tests are grouped by common name (for invocationCount support)- See Also:
BuildStatisticsOptions(int, int)
-
BuildStatisticsOptions
public BuildStatisticsOptions(int optionsMask, int maxNumberOfTestsStacktracesToLoad)
This constructor allows to specify exact options to be used- Parameters:
optionsMask
- this is a bit-wise mask of options, like COMPILATION_ERRORS | PASSED_TESTSmaxNumberOfTestsStacktracesToLoad
- max number of stacktraces to load, -1 to load all- Since:
- 6.0
-
-
Method Detail
-
setMaxNumberOfTestsStacktracesToLoad
public void setMaxNumberOfTestsStacktracesToLoad(int maxNumberOfTestsStacktracesToLoad)
Sets maximum number of tests stacktraces to load, set to -1 to load all stacktraces.- Parameters:
maxNumberOfTestsStacktracesToLoad
- max number of stacktraces to load
-
setLoadCompilationErrors
public void setLoadCompilationErrors(boolean loadCompilationErrors)
Sets whether to load compilation errors (true by default)- Parameters:
loadCompilationErrors
- compilation errors to load
-
setMaxNumberOfCompileErrorsToLoad
public void setMaxNumberOfCompileErrorsToLoad(int maxNumberOfCompileErrorsToLoad)
- Parameters:
maxNumberOfCompileErrorsToLoad
- maximum number of compilation errors to load into build statistics, the bigger the number the more memory it can require, -1 disables the limit- Since:
- 2019.2
-
isLoadCompilationErrors
public boolean isLoadCompilationErrors()
Whether to load compilation errors- Returns:
- see above
-
getMaxNumberOfTestsStacktracesToLoad
public int getMaxNumberOfTestsStacktracesToLoad()
Returns maximum number of tests for which to load stacktraces, if -1 - all stacktraces will be loaded- Returns:
- see above
-
getMaxNumberOfCompileErrorsToLoad
public int getMaxNumberOfCompileErrorsToLoad()
- Returns:
- maximum number of compilation errors to load into the build statistics, -1 indicates there is no limit
-
setLoadFirstFailedIn
public void setLoadFirstFailedIn(boolean loadFirstFailedIn)
- Parameters:
loadFirstFailedIn
- true if "first failed in" data should be preloaded for failed tests- Since:
- 5.1
-
setLoadFixedIn
public void setLoadFixedIn(boolean loadFixedIn)
- Parameters:
loadFixedIn
- true if "already fixed in" data should be preloaded for failed tests- Since:
- 5.1
-
isLoadFirstFailedIn
public boolean isLoadFirstFailedIn()
- Returns:
- true if should load "first failed in" data for failed tests
- Since:
- 5.1
-
isLoadFixedIn
public boolean isLoadFixedIn()
- Returns:
- true if should load "already fixed in" data for failed tests
- Since:
- 5.1
-
isLoadPassedTests
public boolean isLoadPassedTests()
- Returns:
- true if information about passed tests should be loaded
- Since:
- 6.0
-
isGroupTestsByName
public boolean isGroupTestsByName()
- Returns:
- true if tests should be grouped by common name (default, unless NO_GROUPING_BY_NAME is set)
- Since:
- 9.0
-
isLoadIgnoredTests
public boolean isLoadIgnoredTests()
- Returns:
- true if ignored tests should be loaded
- Since:
- 6.0
-
isTestHistorySkipped
public boolean isTestHistorySkipped()
- Returns:
- true if all test history details should be loaded lazy
- Since:
- 2020.2
-
isSet
public boolean isSet(int flagOptions)
- Returns:
- true if options have all bits from flagOptions set
- Since:
- 2020.2
-
containsOptions
public boolean containsOptions(BuildStatisticsOptions otherOptions)
Deprecated.in 2019.2
-
-