Class BuildStatisticsOptions


  • public class BuildStatisticsOptions
    extends Object
    • Field Detail

      • 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 and FIXED_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_TESTS
        maxNumberOfTestsStacktracesToLoad - 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object