public class TestRailApi extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
currentProjectID |
protected String |
serverUrl |
int |
suiteId |
| Constructor and Description |
|---|
TestRailApi()
Setup configuration from property file
|
| Modifier and Type | Method and Description |
|---|---|
Section |
addNewSection(String name,
int parent_id,
int projectID,
int suite_id) |
void |
addTestCase(org.testng.ITestResult result,
Section section,
TestRail annotation) |
void |
addTestSteps(org.testng.ITestResult result,
String steps,
Section section,
TestRail annotation) |
TestCase |
getCurrentTestCase() |
String |
getFullTestCaseName(org.testng.ITestResult result) |
protected Object |
getRequest(String path) |
Run |
getRun(String name,
int projectID) |
Run |
getRunOfCurrentProject()
Returns the current Test Runs of current project
|
List<Run> |
getRuns(int projectID) |
List<Section> |
getSections(int projectID) |
List<Section> |
getSectionsOfCurrentProject() |
boolean |
hasConfigurationErrors() |
boolean |
isAutomatedTestCaseInSection(String testName,
Section section,
TestRail annotation) |
protected Object |
postRequest(String path,
Object data) |
void |
setCurrentTestCase(TestCase testCase) |
protected <T> T |
toClass(Object response,
Class<T> classz) |
protected <T> List<T> |
toCollection(Object response,
Class<T> classz)
Parse the response received and convert it to
|
Object |
updateTestCaseResult(org.testng.ITestResult result,
Run run) |
public int currentProjectID
public int suiteId
protected String serverUrl
public TestCase getCurrentTestCase()
public void setCurrentTestCase(TestCase testCase)
protected <T> List<T> toCollection(Object response, Class<T> classz)
response - classz - public boolean hasConfigurationErrors()
protected Object postRequest(String path, Object data) throws Exception
Exceptionpublic void addTestCase(org.testng.ITestResult result,
Section section,
TestRail annotation)
public void addTestSteps(org.testng.ITestResult result,
String steps,
Section section,
TestRail annotation)
public boolean isAutomatedTestCaseInSection(String testName, Section section, TestRail annotation)
public Run getRunOfCurrentProject()
public String getFullTestCaseName(org.testng.ITestResult result)
Copyright © 2005–2019 Alfresco Software. All rights reserved.