qase-javascript-commons 2.2.19 → 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/changelog.md +21 -15
- package/dist/client/clientV1.d.ts +31 -0
- package/dist/client/clientV1.js +177 -0
- package/dist/client/clientV2.d.ts +26 -0
- package/dist/client/clientV2.js +197 -0
- package/dist/client/dateUtils.d.ts +2 -0
- package/dist/client/dateUtils.js +20 -0
- package/dist/client/interface.d.ts +6 -0
- package/dist/client/interface.js +2 -0
- package/dist/config/config-validation-schema.js +0 -22
- package/dist/env/env-enum.d.ts +1 -2
- package/dist/env/env-enum.js +0 -1
- package/dist/env/env-to-config.js +0 -1
- package/dist/env/env-type.d.ts +2 -3
- package/dist/env/env-validation-schema.js +0 -4
- package/dist/formatter/json-formatter.d.ts +2 -2
- package/dist/formatter/jsonp-formatter.d.ts +2 -2
- package/dist/models/attachment.d.ts +2 -2
- package/dist/models/config/TestOpsOptionsType.d.ts +25 -0
- package/dist/models/config/TestOpsOptionsType.js +2 -0
- package/dist/models/execution-sum.d.ts +2 -2
- package/dist/models/host-data.d.ts +2 -1
- package/dist/models/report.d.ts +3 -3
- package/dist/models/short-result.d.ts +2 -2
- package/dist/models/stats.d.ts +2 -2
- package/dist/models/test-result.d.ts +6 -6
- package/dist/options/options-type.d.ts +2 -6
- package/dist/qase.d.ts +1 -0
- package/dist/qase.js +16 -53
- package/dist/reporters/index.d.ts +1 -1
- package/dist/reporters/testops-reporter.d.ts +8 -161
- package/dist/reporters/testops-reporter.js +24 -537
- package/dist/state/state.js +1 -0
- package/dist/steps/step.d.ts +1 -1
- package/dist/steps/step.js +2 -2
- package/dist/utils/hostData.js +4 -2
- package/dist/utils/logger.js +17 -23
- package/dist/writer/fs-writer.d.ts +3 -3
- package/package.json +3 -2
- package/dist/utils/custom-boundary.d.ts +0 -26
- package/dist/utils/custom-boundary.js +0 -30
package/dist/env/env-enum.d.ts
CHANGED
|
@@ -15,8 +15,7 @@ export declare enum EnvEnum {
|
|
|
15
15
|
export declare enum EnvTestOpsEnum {
|
|
16
16
|
project = "QASE_TESTOPS_PROJECT",
|
|
17
17
|
uploadAttachments = "QASE_TESTOPS_UPLOAD_ATTACHMENTS",
|
|
18
|
-
defect = "QASE_TESTOPS_DEFECT"
|
|
19
|
-
useV2 = "QASE_TESTOPS_API_V2"
|
|
18
|
+
defect = "QASE_TESTOPS_DEFECT"
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* @enum {string}
|
package/dist/env/env-enum.js
CHANGED
|
@@ -21,7 +21,6 @@ var EnvTestOpsEnum;
|
|
|
21
21
|
EnvTestOpsEnum["project"] = "QASE_TESTOPS_PROJECT";
|
|
22
22
|
EnvTestOpsEnum["uploadAttachments"] = "QASE_TESTOPS_UPLOAD_ATTACHMENTS";
|
|
23
23
|
EnvTestOpsEnum["defect"] = "QASE_TESTOPS_DEFECT";
|
|
24
|
-
EnvTestOpsEnum["useV2"] = "QASE_TESTOPS_API_V2";
|
|
25
24
|
})(EnvTestOpsEnum || (exports.EnvTestOpsEnum = EnvTestOpsEnum = {}));
|
|
26
25
|
/**
|
|
27
26
|
* @enum {string}
|
package/dist/env/env-type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EnvEnum, EnvTestOpsEnum, EnvApiEnum, EnvRunEnum, EnvLocalEnum, EnvPlanEnum, EnvBatchEnum } from './env-enum';
|
|
2
2
|
import { ModeEnum } from '../options';
|
|
3
3
|
import { FormatEnum } from '../writer';
|
|
4
|
-
export
|
|
4
|
+
export interface EnvType {
|
|
5
5
|
[EnvEnum.mode]?: `${ModeEnum}`;
|
|
6
6
|
[EnvEnum.fallback]?: `${ModeEnum}`;
|
|
7
7
|
[EnvEnum.debug]?: boolean;
|
|
@@ -11,7 +11,6 @@ export type EnvType = {
|
|
|
11
11
|
[EnvTestOpsEnum.project]?: string;
|
|
12
12
|
[EnvTestOpsEnum.uploadAttachments]?: boolean;
|
|
13
13
|
[EnvTestOpsEnum.defect]?: boolean;
|
|
14
|
-
[EnvTestOpsEnum.useV2]?: boolean;
|
|
15
14
|
[EnvApiEnum.token]?: string;
|
|
16
15
|
[EnvApiEnum.host]?: string;
|
|
17
16
|
[EnvRunEnum.id]?: number;
|
|
@@ -22,4 +21,4 @@ export type EnvType = {
|
|
|
22
21
|
[EnvBatchEnum.size]?: number;
|
|
23
22
|
[EnvLocalEnum.path]?: string;
|
|
24
23
|
[EnvLocalEnum.format]?: `${FormatEnum}`;
|
|
25
|
-
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface TestOpsOptionsType {
|
|
2
|
+
project: string;
|
|
3
|
+
uploadAttachments?: boolean | undefined;
|
|
4
|
+
api: TestOpsApiType;
|
|
5
|
+
run: TestOpsRunType;
|
|
6
|
+
plan: TestOpsPlanType;
|
|
7
|
+
batch?: TestOpsBatchType;
|
|
8
|
+
defect?: boolean | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface TestOpsRunType {
|
|
11
|
+
id?: number | undefined;
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
complete?: boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface TestOpsPlanType {
|
|
17
|
+
id?: number | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface TestOpsBatchType {
|
|
20
|
+
size?: number | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface TestOpsApiType {
|
|
23
|
+
token: string;
|
|
24
|
+
host?: string | undefined;
|
|
25
|
+
}
|
package/dist/models/report.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { HostData } from './host-data';
|
|
|
2
2
|
import { ShortResult } from './short-result';
|
|
3
3
|
import { Stats } from './stats';
|
|
4
4
|
import { ExecutionSum } from './execution-sum';
|
|
5
|
-
export
|
|
5
|
+
export interface Report {
|
|
6
6
|
environment: string;
|
|
7
7
|
execution: ExecutionSum;
|
|
8
8
|
host_data: HostData;
|
|
9
9
|
results: ShortResult[];
|
|
10
10
|
stats: Stats;
|
|
11
|
-
suites:
|
|
11
|
+
suites: string[];
|
|
12
12
|
threads: string[];
|
|
13
13
|
title: string;
|
|
14
|
-
}
|
|
14
|
+
}
|
package/dist/models/stats.d.ts
CHANGED
|
@@ -19,13 +19,13 @@ export declare class TestResultType {
|
|
|
19
19
|
message: string | null;
|
|
20
20
|
constructor(title: string);
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export interface Relation {
|
|
23
23
|
suite?: Suite;
|
|
24
|
-
}
|
|
25
|
-
export
|
|
24
|
+
}
|
|
25
|
+
export interface Suite {
|
|
26
26
|
data: SuiteData[];
|
|
27
|
-
}
|
|
28
|
-
export
|
|
27
|
+
}
|
|
28
|
+
export interface SuiteData {
|
|
29
29
|
title: string;
|
|
30
30
|
public_id: number | null;
|
|
31
|
-
}
|
|
31
|
+
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { QaseApiOptionsType } from 'qaseio/dist/qaseio';
|
|
2
1
|
import { ModeEnum } from './mode-enum';
|
|
3
|
-
import { TestOpsOptionsType } from '../reporters';
|
|
4
2
|
import { DriverEnum, FsWriterOptionsType } from '../writer';
|
|
3
|
+
import { TestOpsOptionsType } from '../models/config/TestOpsOptionsType';
|
|
5
4
|
type RecursivePartial<T> = {
|
|
6
5
|
[K in keyof T]?: RecursivePartial<T[K]> | undefined;
|
|
7
6
|
};
|
|
8
|
-
export type AdditionalTestOpsOptionsType = {
|
|
9
|
-
api?: RecursivePartial<QaseApiOptionsType>;
|
|
10
|
-
};
|
|
11
7
|
export type ConnectionsType = {
|
|
12
8
|
[DriverEnum.local]?: FsWriterOptionsType;
|
|
13
9
|
};
|
|
@@ -25,7 +21,7 @@ export type OptionsType = {
|
|
|
25
21
|
debug?: boolean | undefined;
|
|
26
22
|
environment?: string | undefined;
|
|
27
23
|
rootSuite?: string | undefined;
|
|
28
|
-
testops?:
|
|
24
|
+
testops?: RecursivePartial<TestOpsOptionsType> | undefined;
|
|
29
25
|
report?: RecursivePartial<AdditionalReportOptionsType> | undefined;
|
|
30
26
|
};
|
|
31
27
|
export type FrameworkOptionsType<F extends string, O> = {
|
package/dist/qase.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface ReporterInterface {
|
|
|
4
4
|
addTestResult(result: TestResultType): Promise<void>;
|
|
5
5
|
publish(): Promise<void>;
|
|
6
6
|
startTestRun(): void;
|
|
7
|
+
startTestRunAsync(): Promise<void>;
|
|
7
8
|
isCaptureLogs(): boolean;
|
|
8
9
|
getResults(): TestResultType[];
|
|
9
10
|
sendResults(): Promise<void>;
|
package/dist/qase.js
CHANGED
|
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.QaseReporter = void 0;
|
|
7
7
|
const env_schema_1 = __importDefault(require("env-schema"));
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
-
const qaseio_1 = require("qaseio");
|
|
10
9
|
const reporters_1 = require("./reporters");
|
|
11
10
|
const options_1 = require("./options");
|
|
12
11
|
const env_1 = require("./env");
|
|
13
12
|
const models_1 = require("./models");
|
|
14
13
|
const writer_1 = require("./writer");
|
|
15
|
-
const custom_boundary_1 = require("./utils/custom-boundary");
|
|
16
14
|
const disabled_exception_1 = require("./utils/disabled-exception");
|
|
17
15
|
const logger_1 = require("./utils/logger");
|
|
18
16
|
const state_1 = require("./state/state");
|
|
19
17
|
const hostData_1 = require("./utils/hostData");
|
|
18
|
+
const clientV2_1 = require("./client/clientV2");
|
|
20
19
|
/**
|
|
21
20
|
* @type {Record<TestStatusEnum, (test: TestResultType) => string>}
|
|
22
21
|
*/
|
|
@@ -177,7 +176,7 @@ class QaseReporter {
|
|
|
177
176
|
this.useFallback = true;
|
|
178
177
|
}
|
|
179
178
|
try {
|
|
180
|
-
await this.fallbackReporter
|
|
179
|
+
await this.fallbackReporter.sendResults();
|
|
181
180
|
if (this.withState) {
|
|
182
181
|
state_1.StateManager.setMode(this.options.fallback);
|
|
183
182
|
}
|
|
@@ -210,7 +209,7 @@ class QaseReporter {
|
|
|
210
209
|
this.useFallback = true;
|
|
211
210
|
}
|
|
212
211
|
try {
|
|
213
|
-
await this.fallbackReporter
|
|
212
|
+
await this.fallbackReporter.complete();
|
|
214
213
|
}
|
|
215
214
|
catch (error) {
|
|
216
215
|
this.logger.logError('Unable to complete the run in the fallback reporter:', error);
|
|
@@ -239,7 +238,7 @@ class QaseReporter {
|
|
|
239
238
|
return;
|
|
240
239
|
}
|
|
241
240
|
try {
|
|
242
|
-
this.startTestRunOperation = this.fallbackReporter
|
|
241
|
+
this.startTestRunOperation = this.fallbackReporter.startTestRun();
|
|
243
242
|
if (this.withState) {
|
|
244
243
|
state_1.StateManager.setMode(this.options.fallback);
|
|
245
244
|
}
|
|
@@ -291,6 +290,7 @@ class QaseReporter {
|
|
|
291
290
|
}
|
|
292
291
|
return;
|
|
293
292
|
}
|
|
293
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
294
294
|
if (!this.useFallback) {
|
|
295
295
|
this.fallbackReporter.setTestResults(this.upstreamReporter?.getTestResults() ?? []);
|
|
296
296
|
this.useFallback = true;
|
|
@@ -381,41 +381,21 @@ class QaseReporter {
|
|
|
381
381
|
* @private
|
|
382
382
|
*/
|
|
383
383
|
createReporter(mode, options) {
|
|
384
|
-
const { frameworkPackage, reporterName, environment, rootSuite, report = {}, testops = {}, } = options;
|
|
385
384
|
switch (mode) {
|
|
386
385
|
case options_1.ModeEnum.testops: {
|
|
387
|
-
|
|
388
|
-
if (!token) {
|
|
386
|
+
if (!options.testops?.api?.token) {
|
|
389
387
|
throw new Error(`Either "testops.api.token" parameter or "${env_1.EnvApiEnum.token}" environment variable is required in "testops" mode`);
|
|
390
388
|
}
|
|
391
|
-
if (!project) {
|
|
389
|
+
if (!options.testops.project) {
|
|
392
390
|
throw new Error(`Either "testops.project" parameter or "${env_1.EnvTestOpsEnum.project}" environment variable is required in "testops" mode`);
|
|
393
391
|
}
|
|
394
|
-
const apiClient = new
|
|
395
|
-
|
|
396
|
-
headers: {
|
|
397
|
-
...headers,
|
|
398
|
-
},
|
|
399
|
-
...api,
|
|
400
|
-
}, custom_boundary_1.CustomBoundaryFormData);
|
|
401
|
-
return new reporters_1.TestOpsReporter(this.logger, {
|
|
402
|
-
project,
|
|
403
|
-
uploadAttachments,
|
|
404
|
-
run: {
|
|
405
|
-
title: title ?? `Automated run ${new Date().toISOString()}`,
|
|
406
|
-
description: description ?? `${reporterName} automated run`,
|
|
407
|
-
...run,
|
|
408
|
-
},
|
|
409
|
-
plan,
|
|
410
|
-
batch,
|
|
411
|
-
useV2,
|
|
412
|
-
defect,
|
|
413
|
-
}, apiClient, this.withState, environment, rootSuite, api.host);
|
|
392
|
+
const apiClient = new clientV2_1.ClientV2(this.logger, options.testops, options.environment, options.rootSuite);
|
|
393
|
+
return new reporters_1.TestOpsReporter(this.logger, apiClient, this.withState, options.testops.project, options.testops.api.host, options.testops.batch?.size, options.testops.run?.id);
|
|
414
394
|
}
|
|
415
395
|
case options_1.ModeEnum.report: {
|
|
416
|
-
const localOptions = report
|
|
396
|
+
const localOptions = options.report?.connections?.[writer_1.DriverEnum.local];
|
|
417
397
|
const writer = new writer_1.FsWriter(localOptions);
|
|
418
|
-
return new reporters_1.ReportReporter(this.logger, writer, frameworkPackage, reporterName, environment, rootSuite, testops
|
|
398
|
+
return new reporters_1.ReportReporter(this.logger, writer, options.frameworkPackage, options.reporterName, options.environment, options.rootSuite, options.testops?.run?.id);
|
|
419
399
|
}
|
|
420
400
|
case options_1.ModeEnum.off:
|
|
421
401
|
throw new disabled_exception_1.DisabledException();
|
|
@@ -431,10 +411,7 @@ class QaseReporter {
|
|
|
431
411
|
this.logger.log(resultLogMap[test.execution.status](test));
|
|
432
412
|
}
|
|
433
413
|
setWithState(options) {
|
|
434
|
-
return options.frameworkName
|
|
435
|
-
|| options.frameworkName == ''
|
|
436
|
-
|| options.frameworkName == null
|
|
437
|
-
|| options.frameworkName == undefined;
|
|
414
|
+
return options.frameworkName === 'cypress' || !options.frameworkName;
|
|
438
415
|
}
|
|
439
416
|
maskToken(token) {
|
|
440
417
|
if (token.length <= 7) {
|
|
@@ -443,25 +420,11 @@ class QaseReporter {
|
|
|
443
420
|
return `${token.slice(0, 3)}****${token.slice(-4)}`;
|
|
444
421
|
}
|
|
445
422
|
sanitizeOptions(options) {
|
|
446
|
-
|
|
447
|
-
|
|
423
|
+
const sanitized = JSON.parse(JSON.stringify(options));
|
|
424
|
+
if (sanitized.testops?.api?.token) {
|
|
425
|
+
sanitized.testops.api.token = this.maskToken(sanitized.testops.api.token);
|
|
448
426
|
}
|
|
449
|
-
|
|
450
|
-
for (const key in options) {
|
|
451
|
-
if (Object.prototype.hasOwnProperty.call(options, key)) {
|
|
452
|
-
const value = options[key];
|
|
453
|
-
if (key === 'token' && typeof value === 'string') {
|
|
454
|
-
sanitizedObject[key] = this.maskToken(value);
|
|
455
|
-
}
|
|
456
|
-
else if (typeof value === 'object' && value !== null) {
|
|
457
|
-
sanitizedObject[key] = this.sanitizeOptions(value);
|
|
458
|
-
}
|
|
459
|
-
else {
|
|
460
|
-
sanitizedObject[key] = value;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
return sanitizedObject;
|
|
427
|
+
return sanitized;
|
|
465
428
|
}
|
|
466
429
|
}
|
|
467
430
|
exports.QaseReporter = QaseReporter;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { AbstractReporter, type InternalReporterInterface, } from './abstract-reporter';
|
|
2
2
|
export { ReportReporter } from './report-reporter';
|
|
3
|
-
export { TestOpsReporter
|
|
3
|
+
export { TestOpsReporter } from './testops-reporter';
|
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
import { QaseApiInterface, ResultStepStatus, TestStepResultCreateStatusEnum } from 'qaseio';
|
|
2
1
|
import { AbstractReporter } from './abstract-reporter';
|
|
3
|
-
import {
|
|
2
|
+
import { TestResultType } from '../models';
|
|
4
3
|
import { LoggerInterface } from '../utils/logger';
|
|
5
|
-
|
|
6
|
-
id?: number | undefined;
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
complete?: boolean | undefined;
|
|
10
|
-
}
|
|
11
|
-
export interface TestOpsPlanType {
|
|
12
|
-
id?: number | undefined;
|
|
13
|
-
}
|
|
14
|
-
export interface TestOpsBatchType {
|
|
15
|
-
size?: number | undefined;
|
|
16
|
-
}
|
|
17
|
-
export interface TestOpsOptionsType {
|
|
18
|
-
project: string;
|
|
19
|
-
uploadAttachments?: boolean | undefined;
|
|
20
|
-
run: TestOpsRunType;
|
|
21
|
-
plan: TestOpsPlanType;
|
|
22
|
-
batch?: TestOpsBatchType;
|
|
23
|
-
defect?: boolean | undefined;
|
|
24
|
-
useV2?: boolean | undefined;
|
|
25
|
-
}
|
|
4
|
+
import { IClient } from '../client/interface';
|
|
26
5
|
/**
|
|
27
6
|
* @class TestOpsReporter
|
|
28
7
|
* @extends AbstractReporter
|
|
@@ -30,89 +9,22 @@ export interface TestOpsOptionsType {
|
|
|
30
9
|
export declare class TestOpsReporter extends AbstractReporter {
|
|
31
10
|
private api;
|
|
32
11
|
private withState;
|
|
33
|
-
|
|
34
|
-
* @type {Record<TestStatusEnum, string>}
|
|
35
|
-
*/
|
|
36
|
-
static statusMap: Record<TestStatusEnum, string>;
|
|
37
|
-
/**
|
|
38
|
-
* @type {Record<StepStatusEnum, ResultStepStatus>}
|
|
39
|
-
*/
|
|
40
|
-
static stepStatusMap: Record<StepStatusEnum, ResultStepStatus>;
|
|
41
|
-
/**
|
|
42
|
-
* @type {Record<StepStatusEnum, ResultStepStatus>}
|
|
43
|
-
*/
|
|
44
|
-
static stepStatusMapV1: Record<StepStatusEnum, TestStepResultCreateStatusEnum>;
|
|
45
|
-
/**
|
|
46
|
-
* @type {string}
|
|
47
|
-
* @private
|
|
48
|
-
*/
|
|
12
|
+
private projectCode;
|
|
49
13
|
private readonly baseUrl;
|
|
50
|
-
/**
|
|
51
|
-
* @type {string}
|
|
52
|
-
* @private
|
|
53
|
-
*/
|
|
54
|
-
private readonly projectCode;
|
|
55
|
-
/**
|
|
56
|
-
* @type {boolean | undefined}
|
|
57
|
-
* @private
|
|
58
|
-
*/
|
|
59
|
-
private readonly isUploadAttachments;
|
|
60
|
-
/**
|
|
61
|
-
* @type {TestOpsRunType}
|
|
62
|
-
* @private
|
|
63
|
-
*/
|
|
64
|
-
private run;
|
|
65
|
-
/**
|
|
66
|
-
* @type { string | undefined}
|
|
67
|
-
* @private
|
|
68
|
-
*/
|
|
69
|
-
private readonly environment;
|
|
70
|
-
/**
|
|
71
|
-
* @type { number | undefined}
|
|
72
|
-
* @private
|
|
73
|
-
*/
|
|
74
|
-
private readonly planId;
|
|
75
|
-
/**
|
|
76
|
-
* @type {TestResultType[]}
|
|
77
|
-
* @private
|
|
78
|
-
*/
|
|
79
14
|
private readonly batchSize;
|
|
80
|
-
|
|
81
|
-
* @type {boolean | undefined}
|
|
82
|
-
* @private
|
|
83
|
-
*/
|
|
84
|
-
private readonly useV2;
|
|
85
|
-
/**
|
|
86
|
-
* @type {boolean | undefined}
|
|
87
|
-
* @private
|
|
88
|
-
*/
|
|
89
|
-
private readonly defect;
|
|
90
|
-
/**
|
|
91
|
-
* @type {string | undefined}
|
|
92
|
-
* @private
|
|
93
|
-
*/
|
|
94
|
-
private readonly rootSuite;
|
|
95
|
-
/**
|
|
96
|
-
* @type {number}
|
|
97
|
-
* @private
|
|
98
|
-
*/
|
|
15
|
+
private runId;
|
|
99
16
|
private firstIndex;
|
|
100
|
-
/**
|
|
101
|
-
* @type {boolean}
|
|
102
|
-
* @private
|
|
103
|
-
*/
|
|
104
17
|
private isTestRunReady;
|
|
105
18
|
private mutex;
|
|
106
19
|
/**
|
|
107
20
|
* @param {LoggerInterface} logger
|
|
108
|
-
* @param {
|
|
109
|
-
* @param {QaseApiInterface} api
|
|
21
|
+
* @param {IClient} api
|
|
110
22
|
* @param {boolean} withState
|
|
111
|
-
* @param {string
|
|
112
|
-
* @param {string | undefined} rootSuite
|
|
23
|
+
* @param {string} projectCode
|
|
113
24
|
* @param {string | undefined} baseUrl
|
|
25
|
+
* @param {number | undefined} batchSize
|
|
114
26
|
*/
|
|
115
|
-
constructor(logger: LoggerInterface,
|
|
27
|
+
constructor(logger: LoggerInterface, api: IClient, withState: boolean, projectCode: string, baseUrl?: string, batchSize?: number, runId?: number);
|
|
116
28
|
/**
|
|
117
29
|
* @returns {Promise<void>}
|
|
118
30
|
*/
|
|
@@ -144,71 +56,6 @@ export declare class TestOpsReporter extends AbstractReporter {
|
|
|
144
56
|
* @returns {Promise<void>}
|
|
145
57
|
*/
|
|
146
58
|
complete(): Promise<void>;
|
|
147
|
-
/**
|
|
148
|
-
* @param {TestResultType} result
|
|
149
|
-
* @returns Promise<ResultCreateV2>
|
|
150
|
-
* @private
|
|
151
|
-
*/
|
|
152
|
-
private transformTestResult;
|
|
153
|
-
/**
|
|
154
|
-
* @param {TestResultType} result
|
|
155
|
-
* @returns Promise<ResultCreate>
|
|
156
|
-
* @private
|
|
157
|
-
*/
|
|
158
|
-
private transformTestResultV1;
|
|
159
|
-
/**
|
|
160
|
-
* @returns {ResultExecution}
|
|
161
|
-
* @private
|
|
162
|
-
* @param {TestExecution} exec
|
|
163
|
-
*/
|
|
164
|
-
private getExecution;
|
|
165
|
-
/**
|
|
166
|
-
* @param {Relation | null} relation
|
|
167
|
-
* @returns {ResultRelations}
|
|
168
|
-
* @private
|
|
169
|
-
*/
|
|
170
|
-
private getRelation;
|
|
171
|
-
/**
|
|
172
|
-
* @param {TestStepType[]} steps
|
|
173
|
-
* @param testTitle
|
|
174
|
-
* @returns Promise<ResultStep[]>
|
|
175
|
-
* @private
|
|
176
|
-
*/
|
|
177
|
-
private transformSteps;
|
|
178
|
-
/**
|
|
179
|
-
* @param {TestStepType[]} steps
|
|
180
|
-
* @param testTitle
|
|
181
|
-
* @returns Promise<TestStepResultCreate[]>
|
|
182
|
-
* @private
|
|
183
|
-
*/
|
|
184
|
-
private transformStepsV1;
|
|
185
|
-
private logEmptyStep;
|
|
186
|
-
/**
|
|
187
|
-
* @param {string} title
|
|
188
|
-
* @param {string} description
|
|
189
|
-
* @param {number | undefined} environment
|
|
190
|
-
* @returns {Promise<IdResponse>}
|
|
191
|
-
* @private
|
|
192
|
-
*/
|
|
193
|
-
private createRun;
|
|
194
|
-
/**
|
|
195
|
-
* @returns {string}
|
|
196
|
-
* @private
|
|
197
|
-
*/
|
|
198
|
-
private getDate;
|
|
199
|
-
/**
|
|
200
|
-
* @returns {Promise<void>}
|
|
201
|
-
* @private
|
|
202
|
-
*/
|
|
203
|
-
private uploadAttachments;
|
|
204
|
-
/**
|
|
205
|
-
* Process error and throw QaseError
|
|
206
|
-
* @param {Error | AxiosError} error
|
|
207
|
-
* @param {string} message
|
|
208
|
-
* @param {object} model
|
|
209
|
-
* @private
|
|
210
|
-
*/
|
|
211
|
-
private processError;
|
|
212
59
|
/**
|
|
213
60
|
* @param {string | undefined} url
|
|
214
61
|
* @return string
|