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 🙏

© 2025 – Pkg Stats / Ryan Hefner

wdio-xray-json-reporter

v0.0.1

Published

A WebdriverIO plugin. Report results in xray json format.

Downloads

467

Readme

WDIO Xray JSON Reporter

A WebdriverIO plugin. Report results in Xray json format.

This project was derived from the 'wdio-json-reporter' found here

Installation

The easiest way is to keep wdio-xray-json-reporter as a dependency in your package.json.

{
  "dependencies": {
    "wdio-xray-json-reporter": "~0.0.1"
  }
}

You can simply do it by:

npm install wdio-xray-json-reporter --save

Instructions on how to install WebdriverIO can be found here.

Configuration

Following code shows the default wdio test runner configuration. Just add 'xray-json' as reporter to the array. To get some output during the test you can run the WDIO Dot Reporter and the WDIO JSON Reporter at the same time:

// wdio.conf.js
module.exports = {
  // ...
  reporters: ['dot', 'xray-json'],
  reporterOptions: {
    outputDir: './'
  },
  // ...
};

It's also possible to combine all the resulting jsons into one.

// wdio.conf.js
module.exports = {
  // ...
  reporters: ['dot', 'xray-json'],
  reporterOptions: {
    outputDir: './',
    combined: true
  },
  // ...
};

Another option is to configure the resulting filename of the JSON, if combined is set to false or not set a number is added after the file name: wdio-results-0-1.json etc.

// wdio.conf.js
module.exports = {
  // ...
  reporters: ['dot', 'xray-json'],
  reporterOptions: {
    outputDir: './',
    filename: 'wdio-results'
  },
  // ...
};

Xray and Jira specific information: The feature file names must match the following format to ensure the test ids match in the output match the ids in Jira.

ABC-123.feature -> Maps to Jira test issue ABC-123

Xray and Jira specific options:

reporterOptions: {
    version: '1.0', // Project version in Jira
    revision: '123',
    user: 'bob', // Jira username
    project: 'bobs project', // Jira project
    testPlanKey: 'ABC-XXX' // Jira test plan id
}

Sample Output

[
    {
        "info": {
            "summary": "Execution of test plan: ABC-XXX Browser: chrome",
            "startDate": "2017-08-30T11:36:58-04:00",
            "finishDate": "2017-08-30T11:37:31-04:00",
            "testPlanKey": "ABC-XXX",
            "testEnvironments": [
                "chrome"
            ],
            "user": "XXXXX"
        },
        "tests": [
            {
                "testKey": "ABC-XXX",
                "start": "2017-08-30T11:36:58-04:00",
                "finish": "2017-08-30T11:37:31-04:00",
                "status": "FAIL",
                "steps": [
                    {
                        "status": "PASS",
                        "comment": "I am on the login page"
                    },
                    {
                        "status": "FAIL",
                        "comment": "I log in with user \"admin\"\r\nStep \"I log in with user \"admin\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:13\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "a password \"password\"\r\nStep \"a password \"password\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:14\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "the import dialog is visible\r\n"
                    }
                ],
                "examples": []
            },
            {
                "testKey": "ABC-XXX",
                "start": "2017-08-30T11:36:58-04:00",
                "finish": "2017-08-30T11:37:31-04:00",
                "status": "FAIL",
                "steps": [
                    {
                        "status": "PASS",
                        "comment": "I am on the login page"
                    },
                    {
                        "status": "FAIL",
                        "comment": "I log in with user \"admin\"\r\nStep \"I log in with user \"admin\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:13\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "a password \"password123\"\r\nStep \"a password \"password123\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:14\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "the login page displays error \"Incorrect username or password\"\r\n"
                    }
                ],
                "examples": [
                    "FAIL",
                    "FAIL"
                ]
            }
        ]
    },
    {
        "info": {
            "summary": "Execution of test plan: ABC-XXX Browser: edge",
            "startDate": "2017-08-30T11:36:58-04:00",
            "finishDate": "2017-08-30T11:37:31-04:00",
            "testPlanKey": "ABC-XXX",
            "testEnvironments": [
                "edge"
            ],
            "user": "XXX"
        },
        "tests": [
            {
                "testKey": "ABC-XXX",
                "start": "2017-08-30T11:36:58-04:00",
                "finish": "2017-08-30T11:37:31-04:00",
                "status": "FAIL",
                "steps": [
                    {
                        "status": "PASS",
                        "comment": "I am on the login page"
                    },
                    {
                        "status": "FAIL",
                        "comment": "I log in with user \"admin\"\r\nStep \"I log in with user \"admin\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:13\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "a password \"password\"\r\nStep \"a password \"password\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:14\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "the import dialog is visible\r\n"
                    }
                ],
                "examples": []
            },
            {
                "testKey": "ABC-XXX",
                "start": "2017-08-30T11:36:58-04:00",
                "finish": "2017-08-30T11:37:31-04:00",
                "status": "FAIL",
                "steps": [
                    {
                        "status": "PASS",
                        "comment": "I am on the login page"
                    },
                    {
                        "status": "FAIL",
                        "comment": "I log in with user \"admin\"\r\nStep \"I log in with user \"admin\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:13\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "a password \"password123\"\r\nStep \"a password \"password123\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:14\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "the login page displays error \"Incorrect username or password\"\r\n"
                    }
                ],
                "examples": [
                    "FAIL",
                    "FAIL"
                ]
            }
        ]
    },
    {
        "info": {
            "summary": "Execution of test plan: ABC-XXX Browser: firefox",
            "startDate": "2017-08-30T11:36:58-04:00",
            "finishDate": "2017-08-30T11:37:31-04:00",
            "testPlanKey": "ABC-XXX",
            "testEnvironments": [
                "firefox"
            ],
            "user": "XXX"
        },
        "tests": [
            {
                "testKey": "ABC-XXX",
                "start": "2017-08-30T11:36:58-04:00",
                "finish": "2017-08-30T11:37:31-04:00",
                "status": "FAIL",
                "steps": [
                    {
                        "status": "PASS",
                        "comment": "I am on the login page"
                    },
                    {
                        "status": "FAIL",
                        "comment": "I log in with user \"admin\"\r\nStep \"I log in with user \"admin\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:13\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "a password \"password\"\r\nStep \"a password \"password\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:14\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "the import dialog is visible\r\n"
                    }
                ],
                "examples": []
            },
            {
                "testKey": "ABC-XXX",
                "start": "2017-08-30T11:36:58-04:00",
                "finish": "2017-08-30T11:37:31-04:00",
                "status": "FAIL",
                "steps": [
                    {
                        "status": "PASS",
                        "comment": "I am on the login page"
                    },
                    {
                        "status": "FAIL",
                        "comment": "I log in with user \"admin\"\r\nStep \"I log in with user \"admin\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:13\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "a password \"password123\"\r\nStep \"a password \"password123\"\" is not defined. You can ignore this error by setting\n                              cucumberOpts.ignoreUndefinedDefinitions as true.\r\ntemp\\features\\ABC-XXX.feature:14\r\n"
                    },
                    {
                        "status": "FAIL",
                        "comment": "the login page displays error \"Incorrect username or password\"\r\n"
                    }
                ],
                "examples": [
                    "FAIL",
                    "FAIL"
                ]
            }
        ]
    }
]

For more information on WebdriverIO see the homepage.