testit-api-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +46 -0
- package/readme.md +38 -0
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "testit-api-client",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Client provides methods for communication with TestIt API.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "jest",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prebuild": "rimraf dist"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": "Andrey Kiselev",
|
|
13
|
+
"license": "Apache-2.0",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@babel/core": "^7.15.8",
|
|
16
|
+
"@babel/preset-env": "^7.15.8",
|
|
17
|
+
"@babel/preset-typescript": "^7.15.0",
|
|
18
|
+
"@types/jest": "^27.0.2",
|
|
19
|
+
"@types/minimist": "^1.2.2",
|
|
20
|
+
"@types/node": "^16.10.2",
|
|
21
|
+
"@types/uuid": "^8.3.1",
|
|
22
|
+
"babel-jest": "^27.2.5",
|
|
23
|
+
"jest": "^27.2.5",
|
|
24
|
+
"rimraf": "^3.0.2",
|
|
25
|
+
"ts-node": "^10.2.1",
|
|
26
|
+
"typescript": "^4.4.3",
|
|
27
|
+
"uuid": "^8.3.2"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"axios": "^0.22.0",
|
|
31
|
+
"form-data": "^4.0.0",
|
|
32
|
+
"minimist": "^1.2.5",
|
|
33
|
+
"querystring": "^0.2.1",
|
|
34
|
+
"zod": "^3.11.6"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist"
|
|
38
|
+
],
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/testit-tms/api-client-js/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/testit-tms/api-client-js",
|
|
43
|
+
"directories": {
|
|
44
|
+
"test": "test"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# TestIt Typescript Client
|
|
2
|
+
|
|
3
|
+
Client provides methods for communication with TestIt API.
|
|
4
|
+
|
|
5
|
+
# Installation
|
|
6
|
+
```
|
|
7
|
+
npm i <TBD>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
# Usage
|
|
11
|
+
```ts
|
|
12
|
+
const client = new Client({
|
|
13
|
+
url: 'http://test.com',
|
|
14
|
+
configurationId: 'configurationId',
|
|
15
|
+
privateToken: 'privateToken',
|
|
16
|
+
projectId: 'projectId',
|
|
17
|
+
testRunId: 'testRunId',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
await client.createAutotest(autotest);
|
|
21
|
+
await client.updateAutotest(autotest);
|
|
22
|
+
await client.linkToWorkItem(autotestId, workItem);
|
|
23
|
+
await client.createTestRun(testRun);
|
|
24
|
+
await client.startTestRun(testRunId);
|
|
25
|
+
await client.loadTestRunResults(testRunId, results);
|
|
26
|
+
await client.completeTestRun(testRunId);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
# Configuration
|
|
30
|
+
|
|
31
|
+
| Property | Environment variable | CLI argument | Required | Description |
|
|
32
|
+
| --------------- | ----------------------- | --------------------- | -------- | --------------------------------------------------------- |
|
|
33
|
+
| url | TESTIT_URL | testitUrl | ✔ | URL of TestIt API |
|
|
34
|
+
| configurationId | TESTIT_CONFIGURATION_ID | testitConfigurationId | ✔ | Identifier of configuration |
|
|
35
|
+
| privateToken | TESTIT_PRIVATE_TOKEN | testitPrivateToken | ✔ | User token for access |
|
|
36
|
+
| projectId | TESTIT_PROJECT_ID | testitProjectId | ✔ | Project identifier |
|
|
37
|
+
| testRunId | TESTIT_TEST_RUN_ID | testitTestRunId | ❌ | Test run identifier that is used for storing test results |
|
|
38
|
+
| configFile | TESTIT_CONFIG_FILE | testitConfig | ❌ | Path to additional JSON configuration |
|