Package de.qytera.qtaf.xray.config
Class XrayConfigHelper
java.lang.Object
de.qytera.qtaf.xray.config.XrayConfigHelper
Xray configuration helper.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe selector for accessing the configured Jira PAT.static final StringThe selector for accessing the configured Jira username.static final StringThe selector for accessing the configured Xray PAT.static final StringThe selector for accessing the configured Xray client ID.static final StringThe selector for accessing the configured Xray client secret.static final StringThe selector for accessing the configured Jira project key.static final StringThe selector for accessing the configured assignee to assign text execution issues to.static final StringThe selector for accessing the custom status for failed steps.static final StringThe selector for accessing the custom status for passed steps.static final StringThe selector for accessing the custom status for pending steps.static final StringThe selector for accessing the custom status for skipped steps.static final StringThe selector for accessing the custom status for undefined steps.static final StringThe selector for accessing the custom status for failed test executions.static final StringThe selector for accessing the custom status for passed test executions.static final StringThe selector for accessing the custom status for failed tests.static final StringThe selector for accessing the custom status for passed tests.static final StringThe selector for accessing the custom status for pending tests.static final StringThe selector for accessing the custom status for skipped tests.static final StringThe selector for checking if the driver the tests were executed on should be added to the environments in the Xray upload JSON document.static final StringThe selector for checking if environment information should be added to the Xray upload JSON document.static final StringThe selector for checking if the OS the tests were executed on should be added to the environments in the Xray upload JSON document.static final StringThe selector for accessing whether to upload screenshots as evidence to test execution issues.static final StringThe selector for accessing whether to upload HTML reports as evidence to test execution issues.static final StringThe selector for accessing the configured test plan key to assign text execution issues to.static final StringThe selector for accessing whether test issue summaries should be pulled from Jira.static final StringThe selector for accessing whether test steps should be merged.static final StringThe selector for accessing whether test steps should be updated.static final StringThe selector for accessing the maximum name length of test iteration parameters.static final StringThe selector for accessing the maximum value length of test iteration parameters.static final StringThe selector for accessing the configured Jira URL.static final StringThe selector for accessing the configured Xray URL.static final StringThe selector describing whether the Xray plugin is enabled or disabled.static final StringThe selector describing whether to use an Xray cloud or an Xray server instance.static final StringThe value the plugin uses to determine that Xray cloud should be targeted.static final StringThe value the plugin uses to determine that Xray server should be targeted. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the API token used during authentication against the Jira instance's REST API.static StringReturns the username for authenticating against the Jira instance's REST API.static StringReturns the bearer token for authenticating against Xray server.static StringReturns the client id for authenticating against Xray cloud.static StringReturns the client secret for authenticating against Xray cloud.static StringReturns the URL of the underlying Jira instance.static StringReturns the project key.static StringReturns the user to assign the created test execution issue to.static StringReturns the Jira test execution issue status for test runs containing failed tests.static StringReturns the Jira test execution issue status for successful test runs.static StringReturns the test plan key to attach execution results to.static StringGet Xray server URL.static StringGet Xray status name for failed test steps.static StringGet Xray status name for passed test steps.static StringGet Xray status name for pending test steps.static StringGet Xray status name for skipped test steps.static StringGet Xray status name for undefined test steps.static IntegerReturns the maximum allowed length of iteration parameter names.static IntegerReturns the maximum allowed length of iteration parameter values.static StringGet Xray status name for failed tests.static StringGet Xray status name for passed tests.static StringGet Xray status name for pending tests.static StringGet Xray status name for skipped tests.static StringGet xray service (cloud | server).static booleanReturns whether the Xray plugin is enabled.static booleanCheck if images should be attached as evidence to Xray test execution import.static booleanCheck if HTML report should be attached as evidence to Xray test execution import.static booleanCheck if Xray cloud is enabled.static booleanCheck if Xray server is enabled.static booleanConfiguration value for enabling adding driver environment to the xray upload.static booleanConfiguration value for enabling adding environments to the xray upload.static booleanConfiguration value for enabling adding os environment to the xray upload.static booleanReturns whether test issue summaries should be kept as they are in Jira instead of replacing them usingTest.testName()during results upload.static booleanReturns whether test issue steps should be merged into a single step during results upload.static booleanReturns whether test issue steps should be updated during results upload of tests.
-
Field Details
-
XRAY_ENABLED
The selector describing whether the Xray plugin is enabled or disabled.- See Also:
-
XRAY_SERVICE
The selector describing whether to use an Xray cloud or an Xray server instance. -
URL_XRAY_SELECTOR
The selector for accessing the configured Xray URL.- See Also:
-
URL_JIRA_SELECTOR
The selector for accessing the configured Jira URL.- See Also:
-
PROJECT_KEY
The selector for accessing the configured Jira project key.- See Also:
-
AUTHENTICATION_XRAY_CLIENT_ID
The selector for accessing the configured Xray client ID.- See Also:
-
AUTHENTICATION_XRAY_CLIENT_SECRET
The selector for accessing the configured Xray client secret.- See Also:
-
AUTHENTICATION_XRAY_BEARER_TOKEN
The selector for accessing the configured Xray PAT.- See Also:
-
AUTHENTICATION_JIRA_USERNAME
The selector for accessing the configured Jira username.- See Also:
-
AUTHENTICATION_JIRA_API_TOKEN
The selector for accessing the configured Jira PAT.- See Also:
-
RESULTS_UPLOAD_ASSIGNEE
The selector for accessing the configured assignee to assign text execution issues to.- See Also:
-
RESULTS_UPLOAD_ENVIRONMENTS_ENABLED
The selector for checking if environment information should be added to the Xray upload JSON document.- See Also:
-
RESULTS_UPLOAD_ENVIRONMENTS_OS
The selector for checking if the OS the tests were executed on should be added to the environments in the Xray upload JSON document.- See Also:
-
RESULTS_UPLOAD_ENVIRONMENTS_DRIVER
The selector for checking if the driver the tests were executed on should be added to the environments in the Xray upload JSON document.- See Also:
-
RESULTS_UPLOAD_TEST_PLAN_KEY
The selector for accessing the configured test plan key to assign text execution issues to.- See Also:
-
RESULTS_UPLOAD_SCENARIO_REPORT_EVIDENCE
The selector for accessing whether to upload HTML reports as evidence to test execution issues.- See Also:
-
RESULTS_UPLOAD_SCENARIO_IMAGE_EVIDENCE
The selector for accessing whether to upload screenshots as evidence to test execution issues.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_TEST_EXECUTION_ISSUE_PASSED
The selector for accessing the custom status for passed test executions.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_TEST_EXECUTION_ISSUE_FAILED
The selector for accessing the custom status for failed test executions.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_TEST_PASSED
The selector for accessing the custom status for passed tests.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_TEST_FAILED
The selector for accessing the custom status for failed tests.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_TEST_PENDING
The selector for accessing the custom status for pending tests.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_TEST_SKIPPED
The selector for accessing the custom status for skipped tests.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_STEP_PASSED
The selector for accessing the custom status for passed steps.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_STEP_FAILED
The selector for accessing the custom status for failed steps.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_STEP_PENDING
The selector for accessing the custom status for pending steps.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_STEP_SKIPPED
The selector for accessing the custom status for skipped steps.- See Also:
-
RESULTS_UPLOAD_CUSTOM_STATUS_STEP_UNDEFINED
The selector for accessing the custom status for undefined steps.- See Also:
-
RESULTS_UPLOAD_TESTS_INFO_STEPS_UPDATE
The selector for accessing whether test steps should be updated.- See Also:
-
RESULTS_UPLOAD_TESTS_INFO_STEPS_MERGE
The selector for accessing whether test steps should be merged.- See Also:
-
RESULTS_UPLOAD_TESTS_INFO_KEEP_JIRA_SUMMARY
The selector for accessing whether test issue summaries should be pulled from Jira.- See Also:
-
RESULTS_UPLOAD_TESTS_ITERATIONS_PARAMETERS_MAX_LENGTH_NAME
The selector for accessing the maximum name length of test iteration parameters.- See Also:
-
RESULTS_UPLOAD_TESTS_ITERATIONS_PARAMETERS_MAX_LENGTH_VALUE
The selector for accessing the maximum value length of test iteration parameters.- See Also:
-
XRAY_SERVICE_CLOUD
The value the plugin uses to determine that Xray cloud should be targeted.- See Also:
-
XRAY_SERVICE_SERVER
The value the plugin uses to determine that Xray server should be targeted.- See Also:
-
-
Method Details
-
isEnabled
public static boolean isEnabled()Returns whether the Xray plugin is enabled. Defaults to false if the value has not been specified.- Returns:
- whether the plugin is enabled or false by default
-
getAuthenticationXrayBearerToken
Returns the bearer token for authenticating against Xray server.- Returns:
- the bearer token or null if undefined
-
getAuthenticationXrayClientId
Returns the client id for authenticating against Xray cloud.- Returns:
- the client id or null if undefined
-
getAuthenticationXrayClientSecret
Returns the client secret for authenticating against Xray cloud.- Returns:
- the client secret or null if undefined
-
getAuthenticationJiraUsername
Returns the username for authenticating against the Jira instance's REST API.- Returns:
- the username or null if undefined
-
getAuthenticationJiraAPIToken
Returns the API token used during authentication against the Jira instance's REST API.- Returns:
- the API token or null if undefined
-
getServerUrl
Get Xray server URL.- Returns:
- Xray server URL
-
getJiraUrl
Returns the URL of the underlying Jira instance.- Returns:
- the Jira URL or null if undefined
-
shouldAddEnvironmentsToUpload
public static boolean shouldAddEnvironmentsToUpload()Configuration value for enabling adding environments to the xray upload.- Returns:
- true if environments should be added, false otherwise
-
shouldAddOsEnvironment
public static boolean shouldAddOsEnvironment()Configuration value for enabling adding os environment to the xray upload.- Returns:
- true if os should be added, false otherwise
-
shouldAddDriverEnvironment
public static boolean shouldAddDriverEnvironment()Configuration value for enabling adding driver environment to the xray upload.- Returns:
- true if driver should be added, false otherwise
-
getResultsUploadCustomStatusTestExecutionIssuePassed
Returns the Jira test execution issue status for successful test runs.- Returns:
- the status if configured, otherwise null
-
getResultsUploadCustomStatusTestExecutionIssueFailed
Returns the Jira test execution issue status for test runs containing failed tests.- Returns:
- the status if configured, otherwise null
-
getTestStatusPassed
Get Xray status name for passed tests.- Returns:
- the status name if configured, otherwise null
-
getTestStatusFailed
Get Xray status name for failed tests.- Returns:
- the status name if configured, otherwise null
-
getTestStatusPending
Get Xray status name for pending tests.- Returns:
- the status name if configured, otherwise null
-
getTestStatusSkipped
Get Xray status name for skipped tests.- Returns:
- the status name if configured, otherwise null
-
getStepStatusPassed
Get Xray status name for passed test steps.- Returns:
- the status name if configured, otherwise null
-
getStepStatusFailed
Get Xray status name for failed test steps.- Returns:
- the status name if configured, otherwise null
-
getStepStatusPending
Get Xray status name for pending test steps.- Returns:
- the status name if configured, otherwise null
-
getStepStatusSkipped
Get Xray status name for skipped test steps.- Returns:
- the status name if configured, otherwise null
-
getStepStatusUndefined
Get Xray status name for undefined test steps.- Returns:
- the status name if configured, otherwise null
-
getXrayService
Get xray service (cloud | server).- Returns:
- xray service (cloud | server)
-
isXrayServerService
public static boolean isXrayServerService()Check if Xray server is enabled.- Returns:
- true if enabled, false otherwise
-
isXrayCloudService
public static boolean isXrayCloudService()Check if Xray cloud is enabled.- Returns:
- true if enabled, false otherwise
-
isScenarioReportEvidenceEnabled
public static boolean isScenarioReportEvidenceEnabled()Check if HTML report should be attached as evidence to Xray test execution import.- Returns:
- true if enabled, false otherwise
-
isScenarioImageEvidenceEnabled
public static boolean isScenarioImageEvidenceEnabled()Check if images should be attached as evidence to Xray test execution import.- Returns:
- true if enabled, false otherwise
-
getTestsIterationsParametersNameMaxLength
Returns the maximum allowed length of iteration parameter names.- Returns:
- the maximum length or null if there is no maximum length
-
getTestsIterationsParametersValueMaxLength
Returns the maximum allowed length of iteration parameter values.- Returns:
- the maximum length or null if there is no maximum length
-
shouldResultsUploadTestsInfoStepsMerge
public static boolean shouldResultsUploadTestsInfoStepsMerge()Returns whether test issue steps should be merged into a single step during results upload.- Returns:
- whether they should be merged
-
shouldResultsUploadTestsInfoStepsUpdate
public static boolean shouldResultsUploadTestsInfoStepsUpdate()Returns whether test issue steps should be updated during results upload of tests.- Returns:
- whether they should be updated
-
shouldResultsUploadTestsInfoKeepJiraSummary
public static boolean shouldResultsUploadTestsInfoKeepJiraSummary()Returns whether test issue summaries should be kept as they are in Jira instead of replacing them usingTest.testName()during results upload.- Returns:
- whether summaries should be kept
-
getProjectKey
Returns the project key.- Returns:
- the configured project key
-
getResultsUploadTestPlanKey
Returns the test plan key to attach execution results to.- Returns:
- the configured test plan key or null if no test plan has been defined
-
getResultsUploadAssignee
Returns the user to assign the created test execution issue to.- Returns:
- the configured user or null if no user has been configured
-