Class TestRailAPI

java.lang.Object
org.alfresco.utility.testrail.core.TestRailAPI

public class TestRailAPI extends Object
TestRail Interaction
  • Constructor Details

    • TestRailAPI

      public TestRailAPI()
  • Method Details

    • getCurrentRun

      public Run getCurrentRun()
    • getWateRateLimit

      public int getWateRateLimit()
    • waitForRateLimit

      public void waitForRateLimit()
    • getSections

      public List<Section> getSections(int projectID)
    • getAllTestCases

      public List<TestCase> getAllTestCases(int projectID)
    • getRuns

      public List<Run> getRuns(int projectID)
    • getRequest

      protected Object getRequest(String path) throws Exception
      Throws:
      Exception
    • postRequest

      protected Object postRequest(String path, Object data) throws Exception
      Throws:
      Exception
    • toCollection

      protected <T> List<T> toCollection(Object response, Class<T> classz)
      Parse the response received and convert it to <Class> passed as parameter
      Parameters:
      response -
      classz -
      Returns:
    • getRunOfCurrentProject

      public Run getRunOfCurrentProject()
      Returns the current Test Runs of current project
    • getRun

      public Run getRun(String name, int projectID)
      Perform TestRAIL query of all runs and return the Run object related to and run
      Parameters:
      name -
      projectID -
      Returns:
    • toClass

      protected <T> T toClass(Object response, Class<T> classz)
    • getSectionsOfCurrentProject

      public List<Section> getSectionsOfCurrentProject()
      Returns:
      all Section from TestRail from current project
    • getAllTestCasesFromCurrentProject

      public List<TestCase> getAllTestCasesFromCurrentProject()
    • updateTestRunWithSelectedTestCases

      public void updateTestRunWithSelectedTestCases(List<TestCaseDetail> currentTestCases) throws Exception
      Update current test run and select/add in test run ONLY the executed test cases
      Parameters:
      currentTestCases -
      Throws:
      Exception
    • addResultsForCases

      public Object addResultsForCases(List<TestCaseDetail> currentTestCases) throws Exception
      Throws:
      Exception
    • addNewSection

      public Section addNewSection(String name, Object parent_id, int projectID, int suite_id)
    • uploadTestCase

      public TestCase uploadTestCase(TestCaseDetail currentTest)
    • createNewSection

      public void createNewSection(TestCaseDetail currentTestCase, List<Section> allSections)