Class TestRailApi

java.lang.Object
org.alfresco.utility.testrail.TestRailApi

public class TestRailApi extends Object
Basic implementation of interacting with Test Rail
Author:
Paul Brodner
  • Field Details

    • currentProjectID

      public int currentProjectID
    • suiteId

      public int suiteId
    • serverUrl

      protected String serverUrl
  • Constructor Details

    • TestRailApi

      public TestRailApi()
      Setup configuration from property file
  • Method Details

    • getCurrentTestCase

      public TestCase getCurrentTestCase()
    • setCurrentTestCase

      public void setCurrentTestCase(TestCase testCase)
    • toClass

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

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

      public boolean hasConfigurationErrors()
    • getRequest

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

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

      public List<Section> getSectionsOfCurrentProject()
    • addNewSection

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

      public Run getRun(String name, int projectID)
    • addTestCase

      public void addTestCase(org.testng.ITestResult result, Section section, TestRail annotation)
    • addTestSteps

      public void addTestSteps(org.testng.ITestResult result, String steps, Section section, TestRail annotation)
    • isAutomatedTestCaseInSection

      public boolean isAutomatedTestCaseInSection(String testName, Section section, TestRail annotation)
    • updateTestCaseResult

      public Object updateTestCaseResult(org.testng.ITestResult result, Run run)
    • getRunOfCurrentProject

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

      public String getFullTestCaseName(org.testng.ITestResult result)
    • getSections

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

      public List<Run> getRuns(int projectID)