testrail-js-api
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

NPM NPM NPM

Notice

Please make sure to check the API reference: https://www.gurock.com/testrail/docs/api

To upload attachments for test results you have to enable an option to edit test reults:

Please note the ability to edit test results must be enabled under 'Site Settings' in order for add_attachment_to_result endpoints to work.

Usage

  1. Create new instance of the TestRail class by passing:
  • host - TestRail server address
  • user - Username that has access to the target project.
  • apiKey - Generate API Key from TestRail options.
const testrail = new TestRail(host, user, apiKey);
  1. Invoke API methods. All methods return a promise with response and a value as an object.
const { response, value } = await testrail.addRun(
    projectId,
    runPayload,
);
testrail.addRun(
    projectId,
    runPayload,
).then(({ response, value }) => {
    ...
});

Readme

Keywords

Package Sidebar

Install

npm i testrail-js-api

Weekly Downloads

1,540

Version

0.3.2

License

MIT

Unpacked Size

70 kB

Total Files

47

Last publish

Collaborators

  • mrmentor
  • damianosipiuk