testrail-api-client
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "testrail-api-client", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "JavaScript client for TestRail API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# testrail-api-client | ||
TypeScript (JavaScript) client for TestRail API v2 | ||
TypeScript and JavaScript binding for TestRail API v2 | ||
@@ -31,3 +31,3 @@ ![Node.js Package](https://github.com/VoloBro/testrail-api-client/workflows/Node.js%20Package/badge.svg) | ||
```js | ||
const client = require('testrail-api-client').default; | ||
const client_options = require('testrail-api-client').default; | ||
@@ -41,3 +41,3 @@ const options = { | ||
const client_options = new client(options); | ||
const client = new client_options(options); | ||
``` | ||
@@ -48,3 +48,7 @@ | ||
```js | ||
client.addRun("Example Run", "Example Description", 123, [1,2,3]) | ||
const runName = "Example Run Name"; | ||
const runDescription = "Example Run Description"; | ||
const testSuiteId = 1; | ||
const caseIds = [1,2,3]; | ||
client.addRun(runName, runDescription, testSuiteId, caseIds) | ||
.then(function (runId) { | ||
@@ -58,3 +62,4 @@ console.log(`Created run with id: ${runId}`) | ||
```js | ||
client.getCasesFromRun(123) | ||
const runId = 123; | ||
client.getCasesFromRun(runId) | ||
.then(function (cases) { | ||
@@ -68,3 +73,4 @@ console.log(`Number of cases from run #${runId}: ${cases.length}`) | ||
```js | ||
client.closeRun(123) | ||
const runId = 123; | ||
client.closeRun(runId) | ||
.then(console.log(`Closed run with id: ${runId}`)) | ||
@@ -74,4 +80,5 @@ .catch(error => console.error(error)); | ||
### closeRun | ||
### getCases | ||
```js | ||
const suiteId = 1; | ||
client.getCases(suiteId) | ||
@@ -78,0 +85,0 @@ .then(function (cases) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8372
93