npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xray-client

v1.1.6

Published

This is a 2 classes package that allows you to easily connect to an xray server, and upload junit reports, using as reference this [xray-doc](https://docs.getxray.app/display/XRAYCLOUD/Testing+web+applications+using+Mocha+and+WebdriverIO)

Downloads

296

Readme

Xray Service Client

This is a 2 classes package that allows you to easily connect to an xray server, and upload junit reports, using as reference this xray-doc

Installation

- npm install xray-client

Usage

For Junit xml

Package contains only one public method reportToXray(options) where the options are

  • project: Name of the jira server project where you are pushing the results
  • testPlan: Name of the jira testplan where you are pushing the results
  • resultsFolder: Path to the folder where the testsresults are stored after execution
  • fileName: Name of the xml file name to be uploaded to xray
  • cleanupFilesAfterUpload: Setting this true will delete all the test results in the folder after uploading them
  • host: url to jira server api
  • security: parameter to pass client_id and client_secret
const {reportToXrayWithJunitReport} = require("xray-client");

let resultsDir = resolve(__dirname, './results/junit');
let options = {
    project: 'jira-project',
    testPlan: 'QA-14',
    resultsFolder: resultsDir,
    fileName: 'results.xml',
    host: 'https://xray.cloud.getxray.app/api/v1',
    security: {
        client_id: 'username',
        client_secret: 'password'
    }
}
await reportToXrayWithJunitReport(options);

For Allure xml and screenshots

IMPORTANT: This works on the premise that you are adding test ids in the allure report too as it extract it from the xml to generate the request, if you want to link issues you should add them too.

Package contains only one public method reportToXray(options) where the options are

  • project: Name of the jira server project where you are pushing the results
  • testPlan: Name of the jira testplan where you are pushing the results
  • testExecutionKey: [OPTIONAL] Name of the jira execution where you are pushing the results, in case you leave empty, it will create a new execution under test plan
  • resultsFolder: Path to the folder where the testsresults are stored after execution
  • host: url to jira server api
  • security: parameter to pass client_id and client_secret
const {reportToXrayWithAllureReport} = require("xray-client");

let resultsDir = resolve(__dirname, './results/allure');
let options = {
    project: 'DEMO',
    testPlan: 'DEMO-1',
    testExecutionKey: '',
    resultsFolder: resultsDir,
    title: 'Your title',
    host: 'https://xray.cloud.getxray.app/api/v2',
    security: {
        client_id: 'username',
        client_secret: 'password'
    },
};

await reportToXrayWithAllureReport(options);