Class TestCaseResultUtils

java.lang.Object
com.splunk.splunkjenkins.utils.TestCaseResultUtils

public class TestCaseResultUtils extends Object
  • Constructor Details

    • TestCaseResultUtils

      public TestCaseResultUtils()
  • Method Details

    • split

      public static <T extends hudson.tasks.test.TestResult> List<JunitTestCaseGroup> split(@NonNull List<T> results, int pageSize)
      split test result into groups, each contains maximum pageSize testcases
      Type Parameters:
      T - generic sub types of TestResult
      Parameters:
      results - Test Results
      pageSize - how many test cases to hold in one page
      Returns:
      A list of JunitTestCaseGroup
    • splitRaw

      public static List<JunitTestCaseGroup> splitRaw(hudson.tasks.test.AbstractTestResultAction resultAction, int pageSize)
      Parameters:
      resultAction - Junit Test Result Action
      pageSize - how many test cases to hold in one page
      Returns:
      A list of JunitTestCaseGroup
    • getBuildReport

      @NonNull public static List<JunitTestCaseGroup> getBuildReport(Run build, int pageSize)
      Get the Junit report from build Extract from either TestResultAction or AggregatedTestResultAction
      Parameters:
      build - Jenkins build
      pageSize - how many test cases to hold in one page
      Returns:
      A list of JunitTestCaseGroup
    • getBuildReport

      public static List<JunitTestCaseGroup> getBuildReport(Run build, int pageSize, List<String> ignoredTestActions)
      Get the Junit report from build Extract from either TestResultAction or AggregatedTestResultAction
      Parameters:
      build - Jenkins build
      pageSize - how many test cases to hold in one page
      ignoredTestActions - test action list to be ignored
      Returns:
      A list of JunitTestCaseGroup
    • getSummary

      public static Map<String,Object> getSummary(Run build)
      Parameters:
      build - Jenkins build
      Returns:
      summary of failures,passes,skips, total and duration