Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.23 KB

README.md

File metadata and controls

38 lines (28 loc) · 1.23 KB

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 }) => {
    ...
});