wdio-testrail-service
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

wdio-testrail-service

With this plugin for webdriver.io you can choose test cases to execute based on Priority and Automation Status in TestRail.

Currently, the service only works with mocha test framework and assumes the TestRail Case ID is included in your mocha describe or it (or suite, test for TDD) blocks.

Installation

The easiest way to install this module as a (dev-)dependency is by using the following command:

npm install wdio-testrail-service --save

Or:

npm install wdio-testrail-service --save-dev

Usage

Add wdio-testrail-service and required options to your wdio.conf.js:

exports.config = {
  // ...
 services: [
  [
   "testrail",
   {
    testrailServer: {
     domain: "https://xxxx.testrail.io",
     username: "TestRailUsername",
     apiToken: "TestRailAPIToken",
    },
    projects: ["Web Application"],
    suites: ["Smoke Tests", "Regression Tests"],
    priorities: ["Critical", "High"],
   },
  ],
 ],
  // ...
};

Options

testrailServer (required)

Object containing information required to connect to your TestRail instance:

projects (required)

Array of Project Names to choose tests from.

suites (required)

Array of Suite Names to choose tests from.

priorities (required)

Array of Priority Names to choose tests from. Use the short name (also called Abbreviation in TestRail).

Notes

  1. The service assume you have a custom Dropdown or Multi-select case field named automation with an option named Automated. With this case field, any case not marked as Automated will be excluded from running.

  2. The service considers cucumber-like tagging. For example, supplying mocha-opts.grep "@sanity @smoke" will only include test cases with either @sanity or @smoke in the describe or it blocks in addition to filtering by Priority and Automated status.

  3. Specifying mochaOpts.grep without a tag (no @ in the string) or specifying mochaOpts.invert will override this service completely.

  4. If you enter invalid Priorities, all Priorities will be included.

For more information on WebdriverIO see the homepage.

Package Sidebar

Install

npm i wdio-testrail-service

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

12.6 kB

Total Files

9

Last publish

Collaborators

  • therealbrad