Class TestRailAPI
- java.lang.Object
-
- org.alfresco.utility.testrail.core.TestRailAPI
-
public class TestRailAPI extends java.lang.ObjectTestRail Interaction
-
-
Constructor Summary
Constructors Constructor Description TestRailAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SectionaddNewSection(java.lang.String name, java.lang.Object parent_id, int projectID, int suite_id)java.lang.ObjectaddResultsForCases(java.util.List<TestCaseDetail> currentTestCases)voidcreateNewSection(TestCaseDetail currentTestCase, java.util.List<Section> allSections)java.util.List<TestCase>getAllTestCases(int projectID)java.util.List<TestCase>getAllTestCasesFromCurrentProject()RungetCurrentRun()protected java.lang.ObjectgetRequest(java.lang.String path)RungetRun(java.lang.String name, int projectID)Perform TestRAIL query of all runs and return theRunobject related toand run RungetRunOfCurrentProject()Returns the current Test Runs of current projectjava.util.List<Run>getRuns(int projectID)java.util.List<Section>getSections(int projectID)java.util.List<Section>getSectionsOfCurrentProject()intgetWateRateLimit()protected java.lang.ObjectpostRequest(java.lang.String path, java.lang.Object data)protected <T> TtoClass(java.lang.Object response, java.lang.Class<T> classz)protected <T> java.util.List<T>toCollection(java.lang.Object response, java.lang.Class<T> classz)Parse the response received and convert it to> passed as parameter voidupdateTestRunWithSelectedTestCases(java.util.List<TestCaseDetail> currentTestCases)Update current test run and select/add in test run ONLY the executed test casesTestCaseuploadTestCase(TestCaseDetail currentTest)voidwaitForRateLimit()
-
-
-
Method Detail
-
getCurrentRun
public Run getCurrentRun()
-
getWateRateLimit
public int getWateRateLimit()
-
waitForRateLimit
public void waitForRateLimit()
-
getSections
public java.util.List<Section> getSections(int projectID)
-
getAllTestCases
public java.util.List<TestCase> getAllTestCases(int projectID)
-
getRuns
public java.util.List<Run> getRuns(int projectID)
-
getRequest
protected java.lang.Object getRequest(java.lang.String path) throws java.lang.Exception- Throws:
java.lang.Exception
-
postRequest
protected java.lang.Object postRequest(java.lang.String path, java.lang.Object data) throws java.lang.Exception- Throws:
java.lang.Exception
-
toCollection
protected <T> java.util.List<T> toCollection(java.lang.Object response, java.lang.Class<T> classz)Parse the response received and convert it to> passed as parameter - Parameters:
response-classz-- Returns:
-
getRunOfCurrentProject
public Run getRunOfCurrentProject()
Returns the current Test Runs of current project
-
getRun
public Run getRun(java.lang.String name, int projectID)
Perform TestRAIL query of all runs and return theRunobject related toand run - Parameters:
name-projectID-- Returns:
-
toClass
protected <T> T toClass(java.lang.Object response, java.lang.Class<T> classz)
-
getSectionsOfCurrentProject
public java.util.List<Section> getSectionsOfCurrentProject()
- Returns:
- all
Sectionfrom TestRail from current project
-
getAllTestCasesFromCurrentProject
public java.util.List<TestCase> getAllTestCasesFromCurrentProject()
-
updateTestRunWithSelectedTestCases
public void updateTestRunWithSelectedTestCases(java.util.List<TestCaseDetail> currentTestCases) throws java.lang.Exception
Update current test run and select/add in test run ONLY the executed test cases- Parameters:
currentTestCases-- Throws:
java.lang.Exception
-
addResultsForCases
public java.lang.Object addResultsForCases(java.util.List<TestCaseDetail> currentTestCases) throws java.lang.Exception
- Throws:
java.lang.Exception
-
addNewSection
public Section addNewSection(java.lang.String name, java.lang.Object parent_id, int projectID, int suite_id)
-
uploadTestCase
public TestCase uploadTestCase(TestCaseDetail currentTest)
-
createNewSection
public void createNewSection(TestCaseDetail currentTestCase, java.util.List<Section> allSections)
-
-