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

wdio-5-testrail-reporter

v0.0.3

Published

A WebdriverIO plugin to report testrail service

Downloads

2

Readme

#Testrail Reporter adaptation for Webdriver.io 5

Pushes test results into Testrail system. Fork from mocha testrail reporter

Installation

$ npm install wdio-5-testrail-reporter --save-dev

Usage

Ensure that your testrail installation API is enabled and generate your API keys. See http://docs.gurock.com/

Add reporter to wdio.conf.js:

let WdioTestRailReporter = require('wdio-5-testrail-reporter');

...

    reporters: [[WdioTestRailReporter, {
      domain: "yourdomain.testrail.net",
      username: "username",
      password: "password",
      projectId: 1,
      suiteId: 1,
      runName: "My test run"
    }]]

Mark your mocha suite names with ID of Testrail test suites. Ensure that your suite ids are well distinct from descriptions.

describe("S23 S24 Authenticate with invalid user", . . .
describe("Authenticate a valid user S21", . . .

Mark your mocha test names with ID of Testrail test cases. Ensure that your case ids are well distinct from test descriptions.

it("C123 C124 Authenticate with invalid user", . . .
it("Authenticate a valid user C321", . . .

Only passed or failed tests will be published. Skipped or pending tests will not be published resulting in a "Pending" status in testrail test run.

Options

domain: string domain name of your Testrail instance (e.g. for a hosted instance instance.testrail.net)

username: string user under which the test run will be created (e.g. jenkins or ci)

password: string password or API token for user

projectId: number projet number with which the tests are associated

suiteId: number suite number with which the tests are associated

assignedToId: number (optional) user id which will be assigned failed tests

Automatic creation of sections and cases

You can use next command to generate sections/cases based on your tests in test real:

node scripts/generate-cases.js {path_to_your_wdio.conf} {path_o_your_mail_test_folders}

Example: You have tests structure:

- node_modules
- test-project
-- wdio.conf.js
-- tests
--- test-group-1
---- test-1.js
--- test-group-2
---- test-sub-group-1
----- test-2.js
----- test-3.js
---- test-sub-groop-2
----- test-4.js

Command:

node node_modules/wdio-5-testrail-reporter/scripts/generate-cases.js test-project/wdio.conf.js test-project/tests

will create in test rail:

  • section 'test-group-1'
  • cases that are described in test-1.js inside section 'test-group-1'
  • section 'test-group-2'
  • subsection 'test-sub-group-1' inside section 'test-group-2'
  • cases that are described in test-2.js inside subsection 'test-sub-group-1
  • cases that are described in test-3.js inside subsection 'test-sub-group-1
  • subsection 'test-sub-group-2' inside section 'test-group-2'
  • cases that are described in test-4.js inside subsection 'test-sub-group-2

also test files (test-1.js - test-4.js) will be updated: id of case will be added to it() function

References

  • https://www.npmjs.com/package/mocha-testrail-reporter
  • http://webdriver.io/guide/reporters/customreporter.html
  • http://docs.gurock.com/testrail-api2/start