Package de.qytera.qtaf.xray.service
Class AbstractXrayService
java.lang.Object
de.qytera.qtaf.xray.service.AbstractXrayService
- Direct Known Subclasses:
XrayCloudService,XrayServerService
A class for interfacing with Xray's API. Also provides methods for interfacing with Xray's underlying Jira instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.sun.jersey.api.client.ClientJersey HTTP Clientprotected final ErrorLogCollectionThe collection used for persisting error messages.protected StringJWT auth token that was fetched from the APIprotected final LoggerThe logger instance used for writing logs to stdout and stderr. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringAuthentication against Jira API.abstract StringAuthentication against Xray API.abstract StringGet Xray REST Import PathgetIssueIds(Collection<String> testIssueKeys) Retrieve all issue IDs for the given test issues.abstract StringReturns the Jira instance's JQL search path.Get JWT tokenabstract Map<String,XrayTestStepResponseDto[]> getTestSteps(Collection<String> testIssueKeys) Retrieve all test steps for the given test issues.abstract StringGet Xray URLimportExecution(XrayImportRequestDto xrayImportDTO) Import a test executionsearchJiraIssues(Collection<String> testIssueKeys, AdditionalField... fields) Searches for the given Jira issues, including any additional fields in the response if provided.setJwtToken(String jwtToken) Set jwtToken
-
Field Details
-
jwtToken
JWT auth token that was fetched from the API -
client
protected final com.sun.jersey.api.client.Client clientJersey HTTP Client -
logger
The logger instance used for writing logs to stdout and stderr. -
errorLogs
The collection used for persisting error messages.
-
-
Constructor Details
-
AbstractXrayService
public AbstractXrayService()
-
-
Method Details
-
getXrayURL
Get Xray URL- Returns:
- Xray URL
-
getImportPath
Get Xray REST Import Path- Returns:
- Xray REST Import Path
-
getIssueSearchPath
Returns the Jira instance's JQL search path.- Returns:
- REST path for JQL queries
-
authorizationHeaderXray
Authentication against Xray API.- Returns:
- authorization header value
-
authorizationHeaderJira
Authentication against Jira API.- Returns:
- authorization header value
-
getJwtToken
Get JWT token- Returns:
- jwt token
-
setJwtToken
Set jwtToken- Parameters:
jwtToken- JwtToken- Returns:
- this
-
importExecution
Import a test execution- Parameters:
xrayImportDTO- Test execution DTO- Returns:
- Test execution response DTO
-
searchJiraIssues
public List<JiraIssueResponseDto> searchJiraIssues(Collection<String> testIssueKeys, AdditionalField... fields) Searches for the given Jira issues, including any additional fields in the response if provided.- Parameters:
testIssueKeys- the Jira issues to search forfields- additional fields to include in the response- Returns:
- a list of found issues
- See Also:
-
getIssueIds
Retrieve all issue IDs for the given test issues.- Parameters:
testIssueKeys- the test issues to retrieve the IDs for- Returns:
- a mapping of test issue keys to their IDs
- See Also:
-
getTestSteps
public abstract Map<String,XrayTestStepResponseDto[]> getTestSteps(Collection<String> testIssueKeys) Retrieve all test steps for the given test issues.- Parameters:
testIssueKeys- the test issues to retrieve the steps for- Returns:
- a mapping of test issue keys to their steps
-