Registry / testing / cypress-xray-plugin-v15-compat

cypress-xray-plugin-v15-compat

JSON →
library1.0.0jsnpmunverified

cypress-xray-plugin-v15-compat (version 1.0.0) is a Cypress plugin designed for integrating test results with Xray, a test management tool for Jira (supporting both Server/DC and Cloud versions). This package is specifically noted as a fork, inheriting much of its functionality and documentation from the actively maintained `qytera-gmbh/cypress-xray-plugin` (itself a fork of `csvtuda/cypress-xray-plugin`). It facilitates uploading Cypress test results, including attaching screenshots, web requests, and videos as test execution evidence to Xray. Key features encompass the ability to reuse existing Xray test execution and test plan issues, CI/CD readiness through environment variables for credentials, and robust Cucumber integration for synchronizing step definitions and uploading results. This specific compatibility version is designed to work with modern Cypress environments (requiring Cypress >=10.0.0 and Node.js >=18.0.0), providing comprehensive Xray integration directly from Cypress, covering various evidence types and secure authentication mechanisms.

npm install cypress-xray-plugin-v15-compat
INSTALL
IMPORT
SIG · CYPRESS-XRAY-PLUGI
C
cypress-xray-plugin-v15-compat
testingjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

configureXrayPlugin
import { configureXrayPlugin } from 'cypress-xray-plugin';
import configureXrayPlugin from 'cypress-xray-plugin';
Primary setup function for ESM environments (Cypress configuration files are typically ESM).
configureXrayPlugin
const { configureXrayPlugin } = require('cypress-xray-plugin');
const configureXrayPlugin = require('cypress-xray-plugin');
CommonJS import for Node.js environments or older Cypress configurations where ESM imports are not yet adopted.
XrayPluginConfig
import type { XrayPluginConfig } from 'cypress-xray-plugin';
import { XrayPluginConfig } from 'cypress-xray-plugin';
Type-only import for TypeScript users to define the plugin's configuration object, leveraging the shipped TypeScript types.

Shows how to install the plugin and integrate it into a Cypress project's `cypress.config.ts` using `configureXrayPlugin`, including basic Jira project setup.

npm install --save-dev cypress-xray-plugin // cypress.config.ts import { defineConfig } from 'cypress'; import { configureXrayPlugin } from 'cypress-xray-plugin'; export default defineConfig({ e2e: { async setupNodeEvents(on, config) { // This is required for the Xray plugin to configure itself await configureXrayPlugin(on, config, { jira: { projectKey: process.env.JIRA_PROJECT_KEY ?? 'PRJ', url: process.env.JIRA_URL ?? 'https://example.org', }, // Other configurations like authentication should be set via environment variables // e.g., process.env.XRAY_CLIENT_ID, process.env.XRAY_CLIENT_SECRET }); return config; }, }, });
Debug
Known issues
gotchaThis plugin only uploads test results when Cypress is run via the CLI (`npx cypress run`), not in the interactive 'open' mode (`npx cypress open`).
fix
Always use `npx cypress run` for test executions intended for Xray result upload, especially in CI/CD pipelines.
affects: >=1.0.0
gotchaThis package (`cypress-xray-plugin-v15-compat`) is explicitly a compatibility fork. While it aims for similar functionality, be aware of potential subtle differences, specific version requirements, or delayed feature parity compared to the upstream `qytera-gmbh/cypress-xray-plugin`.
fix
Refer to the documentation and issue tracker of this specific compatibility fork (CaiqueCoelho/cypress-xray-plugin) for precise behavior, known limitations, and support.
affects: >=1.0.0
gotchaJira/Xray authentication is critical and a common point of failure. The plugin relies on environment variables (e.g., `XRAY_CLIENT_ID`, `XRAY_CLIENT_SECRET`, `JIRA_USERNAME`, `JIRA_PASSWORD`) for credentials. Incomplete or incorrect setup will lead to upload failures.
fix
Ensure all required Jira/Xray authentication environment variables are correctly set and accessible in the CI/CD pipeline or local environment where Cypress is executed. Consult the authentication section of the plugin's documentation for details.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Xray: Failed to authenticate. Please check your credentials.
Incorrect or missing Jira/Xray authentication details (client ID/secret or username/password environment variables).
fix
Verify that `XRAY_CLIENT_ID`, `XRAY_CLIENT_SECRET`, or `JIRA_USERNAME` and `JIRA_PASSWORD` environment variables are correctly set and accessible to the Cypress process.
Error: Xray API returned status 400: Bad Request. Check logs for details.
Malformed test issue key in a test title, or the specified Xray test issue does not exist or is inaccessible.
fix
Ensure Xray issue keys in Cypress test titles (e.g., `it("PRJ-42 My test", ...)`) are valid and correspond to existing Xray Test issues. Check the Xray API logs or plugin verbose output for more specific error messages.
TypeError: Cannot read properties of undefined (reading 'setupNodeEvents')
The Cypress configuration file is not correctly setting up the `e2e` or `component` properties, or `setupNodeEvents` is not an async function.
fix
Ensure your `cypress.config.ts` file correctly exports `defineConfig` and that `setupNodeEvents` is defined as an `async` function, as shown in the quickstart example.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
@badeball/cypress-cucumber-preprocessoroptionalProvides Cucumber integration for synchronizing step definitions and uploading results.
cypressrequiredThe core end-to-end testing framework that this plugin extends.
Agent activity
55 hits · last 30 days
node
48
OpenAI (training)
2
Resources
cypress-xray-plugin-v15-compat — npm install cypress-xray-plugin-v15-compat · libregistry