CodeceptJS XRay Cloud Helper

2.1.0-beta.0 · active · verified Tue Apr 21

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

const { set</td>

exports.config = {
  tests: './*_test.js',
  output: './output',
  helpers: {
    WebDriver: {
      url: 'http://localhost',
      browser: 'chrome'
    }
  },
  include: {
    I: './steps_file.js'
  },
  plugins: {
    xrayImport: {
        require: "codeceptjs-xray-cloud-helper",
        enabled: true,
        debug: false,
        projectKey: process.env.JIRA_PROJECT_KEY ?? 'JIRAKEY',
        testExecutionAssigneeUserId: process.env.JIRA_ASSIGNEE_ID ?? '604ba41b020eb0068634',
        importToExistingTestExecution: false,
        existingTestExecutionKey: '',
        testExecutionPlanKey: process.env.JIRA_TEST_PLAN_KEY ?? '',
        testExecutionVersion: '1.0',
        testExecutionRevision: '1',
        testExecutionEnvironments: ['QA'],
        testExecutionSummary: 'Automated CodeceptJS Test Execution',
        testExecutionDescription: 'Results from CI/CD pipeline run.',
        testExecutionSendEvidenceOnFail: true,
        testExecutionCustomFields: [{ id: '63c5731047c0ed24ee469f5b', value: 'local' }],
        createNewJiraTest: true,
        timeout: 120000,
        xrayClientId: process.env.XRAY_CLIENT_ID ?? '74122128E033FD4efef42341E2B1DF70A6027BD799',
        xraySecret: process.env.XRAY_CLIENT_SECRET ?? '28e15830390194549bazzea0ce461274eabb71119113096ba3d746'
    }
  }
}

view raw JSON →