The `codeceptjs-xray-cloud-helper` is a CodeceptJS plugin designed to automate the process of reporting test results from CodeceptJS executions to Jira's XRAY Cloud via its REST API v2. It currently stands at stable version `2.0.1`, with a `2.1.0-beta.0` pre-release indicating ongoing development. This plugin is specifically engineered for XRAY/JIRA Cloud instances, and explicitly does not support on-premise or server versions. Its key differentiators include comprehensive support for various Xray test types (Generic, Manual, Manual with iterations, Cucumber scenario, Cucumber scenario outline), the ability to automatically create new Jira tests or link to existing ones, attach failure screenshots as evidence, link test executions to test plans, and populate custom fields for both Test Executions and Test Runs. Release cadence appears demand-driven, with updates addressing bug fixes and minor enhancements.
npm install codeceptjs-xray-cloud-helperVerified import paths — ran on the pinned version, not inferred.
This configuration snippet for `codecept.conf.js` demonstrates how to enable and configure the `codeceptjs-xray-cloud-helper` plugin. It sets up automatic reporting to XRAY Cloud, creating new Jira tests if needed, and handling authentication with environment variables for sensitive credentials.
Ensure your Jira and XRAY instances are cloud-based. For self-hosted solutions, seek alternative reporting tools.
Use environment variables (e.g., `process.env.XRAY_CLIENT_ID`) for all API keys and secrets. Store these variables securely in your CI/CD pipeline or local environment.
Double-check `projectKey` against your Jira project ID. If `importToExistingTestExecution` is true, verify `existingTestExecutionKey` points to a valid, existing Test Execution in XRAY.
Increase the `timeout` value in the plugin configuration if you experience frequent timeouts during report submission. Monitor XRAY API performance and network conditions.
Verify that your `xrayClientId` and `xraySecret` are correct and active in your Jira's XRAY Cloud integration settings. Ensure the associated API key has 'Create Test Execution' and 'Update Test Run' permissions for the target project.
Confirm the `projectKey` exactly matches an active Jira project key. Check that the XRAY API key has 'Browse Projects' permission for this project.
Verify that the `existingTestExecutionKey` is correct and refers to an active Test Execution in XRAY. Alternatively, set `importToExistingTestExecution` to `false` to allow the plugin to create a new Test Execution.
Increase the `timeout` value in the plugin configuration (e.g., to `300000` for 5 minutes). Consider reducing the number of tests in a single execution or optimizing network conditions.