public class XrayClient
public static XrayClient INSTANCE
@NotNull public XrayApi getXray()
@NotNull
public java.util.List<ai.tock.bot.xray.model.XrayTest> getTestPlanTests(@NotNull
java.lang.String testPlanKey)
Return all the tests contained in the test plan given in parameter. First of all, the function will gather all tests of the given test plan, and then, it will retrieve the Xray issue for each test.
testPlanKey - Identifier of the test plan to obtain its tests.@NotNull
public java.util.List<ai.tock.bot.xray.model.XrayTest> getTests(@NotNull
java.lang.String testKey)
@NotNull
public java.util.List<ai.tock.bot.xray.model.XrayTestStep> getTestSteps(@NotNull
java.lang.String testKey)
Ask the Jira API for the steps of a given test.
testKey - is the identifier of the test to retrieve the steps.@NotNull public SearchIssueResult getKeyOfSearchedIssue(@NotNull java.lang.String jql)
This functions will search for the issue using the JQL query given in parameters and return the identifier of the retrieved issue. This function will return a result only if there is only one issue retrieved by the JQL query.
jql - is the query format of Jira to search for issues.@NotNull public JiraTestProject getProjectFromIssue(@NotNull java.lang.String issueKey)
@NotNull public JiraIssue createNewTestExecutionIssue(@NotNull XrayTestExecutionCreation textExectuionFields)
Create a new Test execution issue in Jira.
@NotNull
public retrofit2.Response<okhttp3.ResponseBody> sendTestExecution(@NotNull
XrayTestExecution execution)
Send the test execution to Jira.
execution - is the result of the test execution.@NotNull
public java.lang.String getAttachmentToString(@NotNull
XrayAttachment attachment)
This function converts an attachment file into a String.
attachment - is the attachment stored as an XrayAttachment object linked to a test step.@Nullable
public okhttp3.ResponseBody saveStep(@NotNull
java.lang.String testKey,
@NotNull
XrayBuildTestStep step)
@NotNull
public okhttp3.ResponseBody deleteStep(@NotNull
java.lang.String testKey,
long stepId)
@NotNull
public okhttp3.ResponseBody getIssue(@NotNull
java.lang.String issueKey)
@Nullable
public okhttp3.ResponseBody addPrecondition(@NotNull
java.lang.String preConditionKey,
@NotNull
java.lang.String jiraId)
@Nullable
public okhttp3.ResponseBody updateTest(@NotNull
java.lang.String jiraId,
@NotNull
JiraTest test)
@NotNull public JiraAttachment uploadAttachment(@NotNull java.lang.String issueId, @NotNull java.lang.String name, @NotNull java.lang.String content)
public void linkTest(@NotNull
java.lang.String key1,
@NotNull
java.lang.String key2)
@NotNull
public java.util.List<java.lang.String> getLabels(@NotNull
java.lang.String key)
@NotNull
public java.util.List<java.lang.String> getLinkedIssues(@NotNull
java.lang.String key,
@NotNull
java.lang.String linkedField)
public retrofit2.Response<okhttp3.ResponseBody> addTestToTestPlan(@NotNull
java.lang.String test,
@NotNull
java.lang.String testPlan)
@NotNull
public java.util.List<ai.tock.bot.xray.model.XrayTestPlan> getProjectTestPlans(@NotNull
java.lang.String project)