@wdio/allure-reporter 8.0.13 → 8.1.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/build/common/api.d.ts +108 -0
- package/build/common/api.d.ts.map +1 -0
- package/build/common/api.js +139 -0
- package/build/compoundError.js +3 -5
- package/build/constants.d.ts +7 -8
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +6 -7
- package/build/index.d.ts +3 -148
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -596
- package/build/reporter.d.ts +70 -0
- package/build/reporter.d.ts.map +1 -0
- package/build/reporter.js +485 -0
- package/build/types.d.ts +6 -0
- package/build/types.d.ts.map +1 -1
- package/build/types.js +1 -1
- package/build/utils.d.ts +3 -10
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +8 -15
- package/cjs/common/api.js +155 -0
- package/cjs/constants.js +40 -0
- package/cjs/package.json +3 -0
- package/cjs/types.js +9 -0
- package/package.json +17 -8
- package/tsconfig.cjs.json +12 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { Status } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Assign feature to test
|
|
5
|
+
* @name addFeature
|
|
6
|
+
* @param {(string)} featureName - feature name or an array of names
|
|
7
|
+
*/
|
|
8
|
+
export declare function addFeature(featureName: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Assign label to test
|
|
11
|
+
* @name addLabel
|
|
12
|
+
* @param {string} name - label name
|
|
13
|
+
* @param {string} value - label value
|
|
14
|
+
*/
|
|
15
|
+
export declare function addLabel(name: string, value: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Assign severity to test
|
|
18
|
+
* @name addSeverity
|
|
19
|
+
* @param {string} severity - severity value
|
|
20
|
+
*/
|
|
21
|
+
export declare function addSeverity(severity: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Assign issue id to test
|
|
24
|
+
* @name addIssue
|
|
25
|
+
* @param {string} issue - issue id value
|
|
26
|
+
*/
|
|
27
|
+
export declare function addIssue(issue: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Assign TMS test id to test
|
|
30
|
+
* @name addTestId
|
|
31
|
+
* @param {string} testId - test id value
|
|
32
|
+
*/
|
|
33
|
+
export declare function addTestId(testId: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Assign story to test
|
|
36
|
+
* @name addStory
|
|
37
|
+
* @param {string} storyName - story name for test
|
|
38
|
+
*/
|
|
39
|
+
export declare function addStory(storyName: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Add environment value
|
|
42
|
+
* @name addEnvironment
|
|
43
|
+
* @param {string} name - environment name
|
|
44
|
+
* @param {string} value - environment value
|
|
45
|
+
*/
|
|
46
|
+
export declare function addEnvironment(name: string, value: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Assign test description to test
|
|
49
|
+
* @name addDescription
|
|
50
|
+
* @param {string} description - description for test
|
|
51
|
+
* @param {string} descriptionType - description type 'text'\'html'\'markdown'
|
|
52
|
+
*/
|
|
53
|
+
export declare function addDescription(description: string, descriptionType: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Add attachment
|
|
56
|
+
* @name addAttachment
|
|
57
|
+
* @param {string} name - attachment file name
|
|
58
|
+
* @param {*} content - attachment content
|
|
59
|
+
* @param {string=} mimeType - attachment mime type
|
|
60
|
+
*/
|
|
61
|
+
export declare function addAttachment(name: string, content: string | Buffer | object, type: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* Start allure step
|
|
64
|
+
* @name startStep
|
|
65
|
+
* @param {string} title - step name in report
|
|
66
|
+
*/
|
|
67
|
+
export declare function startStep(title: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* End current allure step
|
|
70
|
+
* @name endStep
|
|
71
|
+
* @param {StepStatus} [status='passed'] - step status
|
|
72
|
+
*/
|
|
73
|
+
export declare function endStep(status?: Status): void;
|
|
74
|
+
/**
|
|
75
|
+
* Create allure step
|
|
76
|
+
* @name addStep
|
|
77
|
+
* @param {string} title - step name in report
|
|
78
|
+
* @param {Object} [attachmentObject={}] - attachment for step
|
|
79
|
+
* @param {string} attachmentObject.content - attachment content
|
|
80
|
+
* @param {string} [attachmentObject.name='attachment'] - attachment name
|
|
81
|
+
* @param {string} [attachmentObject.type='text/plain'] - attachment type
|
|
82
|
+
* @param {string} [status='passed'] - step status
|
|
83
|
+
*/
|
|
84
|
+
export declare function addStep(title: string, { content, name, type }?: any, status?: Status): void;
|
|
85
|
+
/**
|
|
86
|
+
* Add additional argument to test
|
|
87
|
+
* @name addArgument
|
|
88
|
+
* @param {string} name - argument name
|
|
89
|
+
* @param {string} value - argument value
|
|
90
|
+
*/
|
|
91
|
+
export declare function addArgument(name: string, value: string): void;
|
|
92
|
+
declare const _default: {
|
|
93
|
+
addFeature: typeof addFeature;
|
|
94
|
+
addLabel: typeof addLabel;
|
|
95
|
+
addSeverity: typeof addSeverity;
|
|
96
|
+
addIssue: typeof addIssue;
|
|
97
|
+
addTestId: typeof addTestId;
|
|
98
|
+
addStory: typeof addStory;
|
|
99
|
+
addEnvironment: typeof addEnvironment;
|
|
100
|
+
addDescription: typeof addDescription;
|
|
101
|
+
addAttachment: typeof addAttachment;
|
|
102
|
+
startStep: typeof startStep;
|
|
103
|
+
endStep: typeof endStep;
|
|
104
|
+
addStep: typeof addStep;
|
|
105
|
+
addArgument: typeof addArgument;
|
|
106
|
+
};
|
|
107
|
+
export default _default;
|
|
108
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/common/api.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAYzC;;;;GAIG;AACH,wBAAgB,UAAU,CAAE,WAAW,EAAE,MAAM,QAE9C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAEpD;AACD;;;;GAIG;AACH,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,QAE5C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAE,KAAK,EAAE,MAAM,QAEtC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAE,MAAM,EAAE,MAAM,QAExC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAE,SAAS,EAAE,MAAM,QAE1C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAE1D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,QAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,MAAM,QAK3F;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAE,KAAK,EAAE,MAAM,QAEvC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAE,MAAM,GAAE,MAAiB,QAKjD;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CACnB,KAAK,EAAE,MAAM,EACb,EACI,OAAO,EACP,IAAmB,EACnB,IAAmB,EACtB,GAAE,GAAQ,EACX,MAAM,GAAE,MAAiB,QAQ5B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAEvD;;;;;;;;;;;;;;;;AAED,wBAGC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { events, stepStatuses } from '../constants.js';
|
|
2
|
+
/**
|
|
3
|
+
* Call reporter
|
|
4
|
+
* @param {string} event - event name
|
|
5
|
+
* @param {Object} msg - event payload
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
const tellReporter = (event, msg = {}) => {
|
|
9
|
+
process.emit(event, msg);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Assign feature to test
|
|
13
|
+
* @name addFeature
|
|
14
|
+
* @param {(string)} featureName - feature name or an array of names
|
|
15
|
+
*/
|
|
16
|
+
export function addFeature(featureName) {
|
|
17
|
+
tellReporter(events.addFeature, { featureName });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Assign label to test
|
|
21
|
+
* @name addLabel
|
|
22
|
+
* @param {string} name - label name
|
|
23
|
+
* @param {string} value - label value
|
|
24
|
+
*/
|
|
25
|
+
export function addLabel(name, value) {
|
|
26
|
+
tellReporter(events.addLabel, { name, value });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Assign severity to test
|
|
30
|
+
* @name addSeverity
|
|
31
|
+
* @param {string} severity - severity value
|
|
32
|
+
*/
|
|
33
|
+
export function addSeverity(severity) {
|
|
34
|
+
tellReporter(events.addSeverity, { severity });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Assign issue id to test
|
|
38
|
+
* @name addIssue
|
|
39
|
+
* @param {string} issue - issue id value
|
|
40
|
+
*/
|
|
41
|
+
export function addIssue(issue) {
|
|
42
|
+
tellReporter(events.addIssue, { issue });
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Assign TMS test id to test
|
|
46
|
+
* @name addTestId
|
|
47
|
+
* @param {string} testId - test id value
|
|
48
|
+
*/
|
|
49
|
+
export function addTestId(testId) {
|
|
50
|
+
tellReporter(events.addTestId, { testId });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Assign story to test
|
|
54
|
+
* @name addStory
|
|
55
|
+
* @param {string} storyName - story name for test
|
|
56
|
+
*/
|
|
57
|
+
export function addStory(storyName) {
|
|
58
|
+
tellReporter(events.addStory, { storyName });
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Add environment value
|
|
62
|
+
* @name addEnvironment
|
|
63
|
+
* @param {string} name - environment name
|
|
64
|
+
* @param {string} value - environment value
|
|
65
|
+
*/
|
|
66
|
+
export function addEnvironment(name, value) {
|
|
67
|
+
tellReporter(events.addEnvironment, { name, value });
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Assign test description to test
|
|
71
|
+
* @name addDescription
|
|
72
|
+
* @param {string} description - description for test
|
|
73
|
+
* @param {string} descriptionType - description type 'text'\'html'\'markdown'
|
|
74
|
+
*/
|
|
75
|
+
export function addDescription(description, descriptionType) {
|
|
76
|
+
tellReporter(events.addDescription, { description, descriptionType });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Add attachment
|
|
80
|
+
* @name addAttachment
|
|
81
|
+
* @param {string} name - attachment file name
|
|
82
|
+
* @param {*} content - attachment content
|
|
83
|
+
* @param {string=} mimeType - attachment mime type
|
|
84
|
+
*/
|
|
85
|
+
export function addAttachment(name, content, type) {
|
|
86
|
+
if (!type) {
|
|
87
|
+
type = content instanceof Buffer ? 'image/png' : typeof content === 'string' ? 'text/plain' : 'application/json';
|
|
88
|
+
}
|
|
89
|
+
tellReporter(events.addAttachment, { name, content, type });
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Start allure step
|
|
93
|
+
* @name startStep
|
|
94
|
+
* @param {string} title - step name in report
|
|
95
|
+
*/
|
|
96
|
+
export function startStep(title) {
|
|
97
|
+
tellReporter(events.startStep, title);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* End current allure step
|
|
101
|
+
* @name endStep
|
|
102
|
+
* @param {StepStatus} [status='passed'] - step status
|
|
103
|
+
*/
|
|
104
|
+
export function endStep(status = 'passed') {
|
|
105
|
+
if (!Object.values(stepStatuses).includes(status)) {
|
|
106
|
+
throw new Error(`Step status must be ${Object.values(stepStatuses).join(' or ')}. You tried to set "${status}"`);
|
|
107
|
+
}
|
|
108
|
+
tellReporter(events.endStep, status);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Create allure step
|
|
112
|
+
* @name addStep
|
|
113
|
+
* @param {string} title - step name in report
|
|
114
|
+
* @param {Object} [attachmentObject={}] - attachment for step
|
|
115
|
+
* @param {string} attachmentObject.content - attachment content
|
|
116
|
+
* @param {string} [attachmentObject.name='attachment'] - attachment name
|
|
117
|
+
* @param {string} [attachmentObject.type='text/plain'] - attachment type
|
|
118
|
+
* @param {string} [status='passed'] - step status
|
|
119
|
+
*/
|
|
120
|
+
export function addStep(title, { content, name = 'attachment', type = 'text/plain' } = {}, status = 'passed') {
|
|
121
|
+
if (!Object.values(stepStatuses).includes(status)) {
|
|
122
|
+
throw new Error(`Step status must be ${Object.values(stepStatuses).join(' or ')}. You tried to set "${status}"`);
|
|
123
|
+
}
|
|
124
|
+
const step = content ? { title, attachment: { content, name, type }, status } : { title, status };
|
|
125
|
+
tellReporter(events.addStep, { step });
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Add additional argument to test
|
|
129
|
+
* @name addArgument
|
|
130
|
+
* @param {string} name - argument name
|
|
131
|
+
* @param {string} value - argument value
|
|
132
|
+
*/
|
|
133
|
+
export function addArgument(name, value) {
|
|
134
|
+
tellReporter(events.addArgument, { name, value });
|
|
135
|
+
}
|
|
136
|
+
export default {
|
|
137
|
+
addFeature, addLabel, addSeverity, addIssue, addTestId, addStory, addEnvironment,
|
|
138
|
+
addDescription, addAttachment, startStep, endStep, addStep, addArgument
|
|
139
|
+
};
|
package/build/compoundError.js
CHANGED
|
@@ -9,11 +9,9 @@ export default class CompoundError extends Error {
|
|
|
9
9
|
innerErrors;
|
|
10
10
|
constructor(...innerErrors) {
|
|
11
11
|
const message = ['CompoundError: One or more errors occurred. ---\n'].
|
|
12
|
-
concat(innerErrors.map(x =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return ` ${x.message}\n--- End of error message ---\n`;
|
|
16
|
-
})).join('\n');
|
|
12
|
+
concat(innerErrors.map(x => x.stack
|
|
13
|
+
? `${indentAll(x.stack)}\n--- End of stack trace ---\n`
|
|
14
|
+
: ` ${x.message}\n--- End of error message ---\n`)).join('\n');
|
|
17
15
|
super(message);
|
|
18
16
|
this.innerErrors = innerErrors;
|
|
19
17
|
}
|
package/build/constants.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Status } from './types';
|
|
1
|
+
import type { Status } from './types.js';
|
|
2
2
|
export declare const PASSED = "passed";
|
|
3
3
|
export declare const FAILED = "failed";
|
|
4
4
|
export declare const BROKEN = "broken";
|
|
5
5
|
export declare const PENDING = "pending";
|
|
6
6
|
export declare const CANCELED = "canceled";
|
|
7
7
|
export declare const SKIPPED = "skipped";
|
|
8
|
-
declare const testStatuses: Record<string, Status>;
|
|
9
|
-
declare const stepStatuses: Record<string, Status>;
|
|
10
|
-
declare const events: {
|
|
8
|
+
export declare const testStatuses: Record<string, Status>;
|
|
9
|
+
export declare const stepStatuses: Record<string, Status>;
|
|
10
|
+
export declare const events: {
|
|
11
11
|
readonly addLabel: "allure:addLabel";
|
|
12
12
|
readonly addFeature: "allure:addFeature";
|
|
13
13
|
readonly addStory: "allure:addStory";
|
|
@@ -22,8 +22,7 @@ declare const events: {
|
|
|
22
22
|
readonly addStep: "allure:addStep";
|
|
23
23
|
readonly addArgument: "allure:addArgument";
|
|
24
24
|
};
|
|
25
|
-
declare const mochaEachHooks: readonly ["\"before each\" hook", "\"after each\" hook"];
|
|
26
|
-
declare const mochaAllHooks: readonly ["\"before all\" hook", "\"after all\" hook"];
|
|
27
|
-
declare const linkPlaceholder = "{}";
|
|
28
|
-
export { testStatuses, stepStatuses, events, mochaEachHooks, mochaAllHooks, linkPlaceholder };
|
|
25
|
+
export declare const mochaEachHooks: readonly ["\"before each\" hook", "\"after each\" hook"];
|
|
26
|
+
export declare const mochaAllHooks: readonly ["\"before all\" hook", "\"after all\" hook"];
|
|
27
|
+
export declare const linkPlaceholder = "{}";
|
|
29
28
|
//# sourceMappingURL=constants.d.ts.map
|
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,eAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,eAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,eAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,eAAO,MAAM,OAAO,YAAY,CAAA;AAChC,eAAO,MAAM,QAAQ,aAAa,CAAA;AAClC,eAAO,MAAM,OAAO,YAAY,CAAA;AAEhC,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKtC,CAAA;AACV,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMtC,CAAA;AAEV,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAcT,CAAA;AAEV,eAAO,MAAM,cAAc,0DAAuD,CAAA;AAClF,eAAO,MAAM,aAAa,wDAAqD,CAAA;AAC/E,eAAO,MAAM,eAAe,OAAO,CAAA"}
|
package/build/constants.js
CHANGED
|
@@ -4,20 +4,20 @@ export const BROKEN = 'broken';
|
|
|
4
4
|
export const PENDING = 'pending';
|
|
5
5
|
export const CANCELED = 'canceled';
|
|
6
6
|
export const SKIPPED = 'skipped';
|
|
7
|
-
const testStatuses = {
|
|
7
|
+
export const testStatuses = {
|
|
8
8
|
PASSED,
|
|
9
9
|
FAILED,
|
|
10
10
|
BROKEN,
|
|
11
11
|
PENDING
|
|
12
12
|
};
|
|
13
|
-
const stepStatuses = {
|
|
13
|
+
export const stepStatuses = {
|
|
14
14
|
PASSED,
|
|
15
15
|
FAILED,
|
|
16
16
|
BROKEN,
|
|
17
17
|
CANCELED,
|
|
18
18
|
SKIPPED
|
|
19
19
|
};
|
|
20
|
-
const events = {
|
|
20
|
+
export const events = {
|
|
21
21
|
addLabel: 'allure:addLabel',
|
|
22
22
|
addFeature: 'allure:addFeature',
|
|
23
23
|
addStory: 'allure:addStory',
|
|
@@ -32,7 +32,6 @@ const events = {
|
|
|
32
32
|
addStep: 'allure:addStep',
|
|
33
33
|
addArgument: 'allure:addArgument'
|
|
34
34
|
};
|
|
35
|
-
const mochaEachHooks = ['"before each" hook', '"after each" hook'];
|
|
36
|
-
const mochaAllHooks = ['"before all" hook', '"after all" hook'];
|
|
37
|
-
const linkPlaceholder = '{}';
|
|
38
|
-
export { testStatuses, stepStatuses, events, mochaEachHooks, mochaAllHooks, linkPlaceholder };
|
|
35
|
+
export const mochaEachHooks = ['"before each" hook', '"after each" hook'];
|
|
36
|
+
export const mochaAllHooks = ['"before all" hook', '"after all" hook'];
|
|
37
|
+
export const linkPlaceholder = '{}';
|
package/build/index.d.ts
CHANGED
|
@@ -1,150 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import WDIOReporter, { SuiteStats, HookStats, RunnerStats, TestStats, BeforeCommandArgs, AfterCommandArgs, CommandArgs } from '@wdio/reporter';
|
|
3
|
-
import { AddAttachmentEventArgs, AddDescriptionEventArgs, AddEnvironmentEventArgs, AddFeatureEventArgs, AddIssueEventArgs, AddLabelEventArgs, AddSeverityEventArgs, AddStoryEventArgs, AddTestIdEventArgs, AllureReporterOptions, Status } from './types.js';
|
|
4
|
-
declare class AllureReporter extends WDIOReporter {
|
|
5
|
-
private _allure;
|
|
6
|
-
private _capabilities;
|
|
7
|
-
private _isMultiremote?;
|
|
8
|
-
private _config?;
|
|
9
|
-
private _lastScreenshot?;
|
|
10
|
-
private _options;
|
|
11
|
-
private _consoleOutput;
|
|
12
|
-
private _originalStdoutWrite;
|
|
13
|
-
private _addConsoleLogs;
|
|
14
|
-
private _startedFeatures;
|
|
15
|
-
constructor(options?: AllureReporterOptions);
|
|
16
|
-
registerListeners(): void;
|
|
17
|
-
onRunnerStart(runner: RunnerStats): void;
|
|
18
|
-
onSuiteStart(suite: SuiteStats): void;
|
|
19
|
-
onSuiteEnd(suite: SuiteStats): any;
|
|
20
|
-
onTestStart(test: TestStats | HookStats): void;
|
|
21
|
-
setCaseParameters(cid: string | undefined, parentUid: string | undefined): void;
|
|
22
|
-
getParentSuite(uid?: string): SuiteStats | undefined;
|
|
23
|
-
getLabels({ tags }: SuiteStats): {
|
|
24
|
-
name: string;
|
|
25
|
-
value: string;
|
|
26
|
-
}[];
|
|
27
|
-
onTestPass(): any;
|
|
28
|
-
onTestFail(test: TestStats | HookStats): void;
|
|
29
|
-
onTestSkip(test: TestStats): void;
|
|
30
|
-
onBeforeCommand(command: BeforeCommandArgs): void;
|
|
31
|
-
onAfterCommand(command: AfterCommandArgs): void;
|
|
32
|
-
onHookStart(hook: HookStats): false | undefined;
|
|
33
|
-
onHookEnd(hook: HookStats): false | undefined;
|
|
34
|
-
addLabel({ name, value }: AddLabelEventArgs): false | undefined;
|
|
35
|
-
addStory({ storyName }: AddStoryEventArgs): false | undefined;
|
|
36
|
-
addFeature({ featureName }: AddFeatureEventArgs): false | undefined;
|
|
37
|
-
addSeverity({ severity }: AddSeverityEventArgs): false | undefined;
|
|
38
|
-
addIssue({ issue }: AddIssueEventArgs): false | undefined;
|
|
39
|
-
addTestId({ testId }: AddTestIdEventArgs): false | undefined;
|
|
40
|
-
addEnvironment({ name, value }: AddEnvironmentEventArgs): false | undefined;
|
|
41
|
-
addDescription({ description, descriptionType }: AddDescriptionEventArgs): false | undefined;
|
|
42
|
-
addAttachment({ name, content, type }: AddAttachmentEventArgs): false | undefined;
|
|
43
|
-
startStep(title: string): false | undefined;
|
|
44
|
-
endStep(status: Status): false | undefined;
|
|
45
|
-
addStep({ step }: any): false | undefined;
|
|
46
|
-
addArgument({ name, value }: any): false | undefined;
|
|
47
|
-
isAnyTestRunning(): any;
|
|
48
|
-
isScreenshotCommand(command: CommandArgs): boolean;
|
|
49
|
-
dumpJSON(name: string, json: object): void;
|
|
50
|
-
attachScreenshot(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Assign feature to test
|
|
53
|
-
* @name addFeature
|
|
54
|
-
* @param {(string)} featureName - feature name or an array of names
|
|
55
|
-
*/
|
|
56
|
-
static addFeature: (featureName: string) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Assign label to test
|
|
59
|
-
* @name addLabel
|
|
60
|
-
* @param {string} name - label name
|
|
61
|
-
* @param {string} value - label value
|
|
62
|
-
*/
|
|
63
|
-
static addLabel: (name: string, value: string) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Assign severity to test
|
|
66
|
-
* @name addSeverity
|
|
67
|
-
* @param {string} severity - severity value
|
|
68
|
-
*/
|
|
69
|
-
static addSeverity: (severity: string) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Assign issue id to test
|
|
72
|
-
* @name addIssue
|
|
73
|
-
* @param {string} issue - issue id value
|
|
74
|
-
*/
|
|
75
|
-
static addIssue: (issue: string) => void;
|
|
76
|
-
/**
|
|
77
|
-
* Assign TMS test id to test
|
|
78
|
-
* @name addTestId
|
|
79
|
-
* @param {string} testId - test id value
|
|
80
|
-
*/
|
|
81
|
-
static addTestId: (testId: string) => void;
|
|
82
|
-
/**
|
|
83
|
-
* Assign story to test
|
|
84
|
-
* @name addStory
|
|
85
|
-
* @param {string} storyName - story name for test
|
|
86
|
-
*/
|
|
87
|
-
static addStory: (storyName: string) => void;
|
|
88
|
-
/**
|
|
89
|
-
* Add environment value
|
|
90
|
-
* @name addEnvironment
|
|
91
|
-
* @param {string} name - environment name
|
|
92
|
-
* @param {string} value - environment value
|
|
93
|
-
*/
|
|
94
|
-
static addEnvironment: (name: string, value: string) => void;
|
|
95
|
-
/**
|
|
96
|
-
* Assign test description to test
|
|
97
|
-
* @name addDescription
|
|
98
|
-
* @param {string} description - description for test
|
|
99
|
-
* @param {string} descriptionType - description type 'text'\'html'\'markdown'
|
|
100
|
-
*/
|
|
101
|
-
static addDescription: (description: string, descriptionType: string) => void;
|
|
102
|
-
/**
|
|
103
|
-
* Add attachment
|
|
104
|
-
* @name addAttachment
|
|
105
|
-
* @param {string} name - attachment file name
|
|
106
|
-
* @param {*} content - attachment content
|
|
107
|
-
* @param {string=} mimeType - attachment mime type
|
|
108
|
-
*/
|
|
109
|
-
static addAttachment: (name: string, content: string | Buffer | object, type: string) => void;
|
|
110
|
-
/**
|
|
111
|
-
* Start allure step
|
|
112
|
-
* @name startStep
|
|
113
|
-
* @param {string} title - step name in report
|
|
114
|
-
*/
|
|
115
|
-
static startStep: (title: string) => void;
|
|
116
|
-
/**
|
|
117
|
-
* End current allure step
|
|
118
|
-
* @name endStep
|
|
119
|
-
* @param {StepStatus} [status='passed'] - step status
|
|
120
|
-
*/
|
|
121
|
-
static endStep: (status?: Status) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Create allure step
|
|
124
|
-
* @name addStep
|
|
125
|
-
* @param {string} title - step name in report
|
|
126
|
-
* @param {Object} [attachmentObject={}] - attachment for step
|
|
127
|
-
* @param {string} attachmentObject.content - attachment content
|
|
128
|
-
* @param {string} [attachmentObject.name='attachment'] - attachment name
|
|
129
|
-
* @param {string} [attachmentObject.type='text/plain'] - attachment type
|
|
130
|
-
* @param {string} [status='passed'] - step status
|
|
131
|
-
*/
|
|
132
|
-
static addStep: (title: string, { content, name, type }?: any, status?: Status) => void;
|
|
133
|
-
/**
|
|
134
|
-
* Add additional argument to test
|
|
135
|
-
* @name addArgument
|
|
136
|
-
* @param {string} name - argument name
|
|
137
|
-
* @param {string} value - argument value
|
|
138
|
-
*/
|
|
139
|
-
static addArgument: (name: string, value: string) => void;
|
|
140
|
-
}
|
|
141
|
-
export default AllureReporter;
|
|
142
|
-
export { AllureReporterOptions };
|
|
1
|
+
import AllureReporter from './reporter.js';
|
|
143
2
|
export * from './types.js';
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
interface ReporterOption extends AllureReporterOptions {
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
3
|
+
export * from './common/api.js';
|
|
4
|
+
export default AllureReporter;
|
|
150
5
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,eAAe,CAAA;AAE1C,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,eAAe,cAAc,CAAA"}
|