xray-cucumber-upload
v1.0.0
Published
An npm package to upload Cucumber JSON test results to Xray in Jira
Readme
xray-cucumber-upload
A simple npm package for uploading Cucumber JSON test results to Xray in Jira.
Prerequisites
- Node.js (v14 or higher recommended)
- An active Jira account with Xray installed
- Xray API credentials:
XRAY_CLIENT_ID,XRAY_CLIENT_SECRET,XRAY_API_BASE_URL
Installation
- Clone or download the repository.
- Install dependencies:
npm install
## Usage
Step 1: Set up environment variables
Before running the script, set the following environment variables in your terminal or create a .env file in the root of your project:
export XRAY_CLIENT_ID=<your-client-id>
export XRAY_CLIENT_SECRET=<your-client-secret>
export XRAY_API_BASE_URL=<your-xray-api-base-url>
Step 2: Run the script
To upload a Cucumber JSON file to Xray, run the following command:
node index.js <path-to-cucumber-json> <project-key> [test-execution-key]
<path-to-cucumber-json>: The path to your Cucumber JSON report file.
<project-key>: The Jira project key where the test results should be uploaded.
[test-execution-key]: Optional. If you want to upload results to a specific test execution in Xray, provide the test execution key. If omitted, a new test execution will be created.
Example
node index.js ./reports/cucumber-results.json PROJ-1234
