qase-javascript-commons 2.3.0 → 2.3.1
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/README.md +24 -24
- package/dist/client/clientV1.js +2 -2
- package/dist/client/dateUtils.js +1 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -31,31 +31,31 @@ Qase JS Reporters can be configured in multiple ways:
|
|
|
31
31
|
|
|
32
32
|
All configuration options are listed in the table below:
|
|
33
33
|
|
|
34
|
-
| Description
|
|
35
|
-
|
|
36
|
-
| **Common**
|
|
37
|
-
| Mode of reporter
|
|
38
|
-
| Fallback mode of reporter
|
|
39
|
-
| Environment
|
|
40
|
-
| Root suite
|
|
41
|
-
| Enable debug logs
|
|
42
|
-
| Enable capture logs from `stdout` and `stderr`
|
|
43
|
-
| **Qase Report configuration**
|
|
44
|
-
| Driver used for report mode
|
|
45
|
-
| Path to save the report
|
|
46
|
-
| Local report format
|
|
47
|
-
| **Qase TestOps configuration**
|
|
48
|
-
| Token for [API access](https://developers.qase.io/#authentication)
|
|
49
|
-
| Qase API host. For enterprise users, specify
|
|
50
|
-
| Qase enterprise environment
|
|
34
|
+
| Description | Config file | Environment variable | Default value | Required | Possible values |
|
|
35
|
+
|-----------------------------------------------------------------------------------------------------------------------|----------------------------|---------------------------------|-----------------------------------------|----------|----------------------------|
|
|
36
|
+
| **Common** | | | | | |
|
|
37
|
+
| Mode of reporter | `mode` | `QASE_MODE` | `off` | No | `testops`, `report`, `off` |
|
|
38
|
+
| Fallback mode of reporter | `fallback` | `QASE_FALLBACK` | `off` | No | `testops`, `report`, `off` |
|
|
39
|
+
| Environment | `environment` | `QASE_ENVIRONMENT` | undefined | No | Any string |
|
|
40
|
+
| Root suite | `rootSuite` | `QASE_ROOT_SUITE` | undefined | No | Any string |
|
|
41
|
+
| Enable debug logs | `debug` | `QASE_DEBUG` | `False` | No | `True`, `False` |
|
|
42
|
+
| Enable capture logs from `stdout` and `stderr` | `testops.defect` | `QASE_CAPTURE_LOGS` | `False` | No | `True`, `False` |
|
|
43
|
+
| **Qase Report configuration** | | | | | |
|
|
44
|
+
| Driver used for report mode | `report.driver` | `QASE_REPORT_DRIVER` | `local` | No | `local` |
|
|
45
|
+
| Path to save the report | `report.connection.path` | `QASE_REPORT_CONNECTION_PATH` | `./build/qase-report` | | |
|
|
46
|
+
| Local report format | `report.connection.format` | `QASE_REPORT_CONNECTION_FORMAT` | `json` | | `json`, `jsonp` |
|
|
47
|
+
| **Qase TestOps configuration** | | | | | |
|
|
48
|
+
| Token for [API access](https://developers.qase.io/#authentication) | `testops.api.token` | `QASE_TESTOPS_API_TOKEN` | undefined | Yes | Any string |
|
|
49
|
+
| Qase API host. For enterprise users, specify address: `example.qase.io` | `testops.api.host` | `QASE_TESTOPS_API_HOST` | `qase.io` | No | Any string |
|
|
50
|
+
| Qase enterprise environment | `testops.api.enterprise` | `QASE_TESTOPS_API_ENTERPRISE` | `False` | No | `True`, `False` |
|
|
51
51
|
| Code of your project, which you can take from the URL: `https://app.qase.io/project/DEMOTR` - `DEMOTR` is the project code | `testops.project` | `QASE_TESTOPS_PROJECT` | undefined | Yes | Any string |
|
|
52
|
-
| Qase test run ID
|
|
53
|
-
| Qase test run title
|
|
54
|
-
| Qase test run description
|
|
55
|
-
| Qase test run complete
|
|
56
|
-
| Qase test plan ID
|
|
57
|
-
| Size of batch for sending test results
|
|
58
|
-
| Enable defects for failed test cases
|
|
52
|
+
| Qase test run ID | `testops.run.id` | `QASE_TESTOPS_RUN_ID` | undefined | No | Any integer |
|
|
53
|
+
| Qase test run title | `testops.run.title` | `QASE_TESTOPS_RUN_TITLE` | `Automated run <Current date and time>` | No | Any string |
|
|
54
|
+
| Qase test run description | `testops.run.description` | `QASE_TESTOPS_RUN_DESCRIPTION` | `<Framework name> automated run` | No | Any string |
|
|
55
|
+
| Qase test run complete | `testops.run.complete` | `QASE_TESTOPS_RUN_COMPLETE` | `True` | | `True`, `False` |
|
|
56
|
+
| Qase test plan ID | `testops.plan.id` | `QASE_TESTOPS_PLAN_ID` | undefined | No | Any integer |
|
|
57
|
+
| Size of batch for sending test results | `testops.batch.size` | `QASE_TESTOPS_BATCH_SIZE` | `200` | No | Any integer |
|
|
58
|
+
| Enable defects for failed test cases | `testops.defect` | `QASE_TESTOPS_DEFECT` | `False` | No | `True`, `False` |
|
|
59
59
|
|
|
60
60
|
### Example `qase.config.json` config:
|
|
61
61
|
|
package/dist/client/clientV1.js
CHANGED
|
@@ -58,10 +58,10 @@ class ClientV1 {
|
|
|
58
58
|
if (this.config.run.id) {
|
|
59
59
|
return this.config.run.id;
|
|
60
60
|
}
|
|
61
|
-
this.logger.logDebug('Creating test run');
|
|
62
61
|
try {
|
|
63
62
|
const environmentId = await this.getEnvironmentId();
|
|
64
63
|
const runObject = this.prepareRunObject(environmentId);
|
|
64
|
+
this.logger.logDebug(`Creating test run: ${JSON.stringify(runObject)}`);
|
|
65
65
|
const { data } = await this.runClient.createRun(this.config.project, runObject);
|
|
66
66
|
if (!data.result?.id) {
|
|
67
67
|
throw new qase_error_1.QaseError('Failed to create test run');
|
|
@@ -135,7 +135,7 @@ class ClientV1 {
|
|
|
135
135
|
description: this.config.run.description ?? '',
|
|
136
136
|
is_autotest: true,
|
|
137
137
|
cases: [],
|
|
138
|
-
start_time: (0, dateUtils_1.
|
|
138
|
+
start_time: (0, dateUtils_1.getStartTime)(),
|
|
139
139
|
};
|
|
140
140
|
if (environmentId !== undefined) {
|
|
141
141
|
runObject.environment_id = environmentId;
|
package/dist/client/dateUtils.js
CHANGED
|
@@ -15,7 +15,6 @@ function formatUTCDate(date) {
|
|
|
15
15
|
exports.formatUTCDate = formatUTCDate;
|
|
16
16
|
function getStartTime() {
|
|
17
17
|
const date = new Date();
|
|
18
|
-
date.
|
|
19
|
-
return formatUTCDate(date);
|
|
18
|
+
return formatUTCDate(new Date(date.getTime() - 10000));
|
|
20
19
|
}
|
|
21
20
|
exports.getStartTime = getStartTime;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qase-javascript-commons",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Qase JS Reporters",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"lodash.merge": "^4.6.2",
|
|
33
33
|
"lodash.mergewith": "^4.6.2",
|
|
34
34
|
"mime-types": "^2.1.33",
|
|
35
|
-
"qase-api-client": "~1.0.
|
|
36
|
-
"qase-api-v2-client": "~1.0.
|
|
35
|
+
"qase-api-client": "~1.0.1",
|
|
36
|
+
"qase-api-v2-client": "~1.0.1",
|
|
37
37
|
"strip-ansi": "^6.0.1",
|
|
38
38
|
"uuid": "^9.0.0",
|
|
39
39
|
"async-mutex": "~0.5.0"
|