1 |
|
2 | export declare const ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
|
3 | export declare const ALLURE_IMAGEDIFF_CONTENT_TYPE = "application/vnd.allure.image.diff";
|
4 | export declare const ALLURE_SKIPPED_BY_TEST_PLAN_LABEL = "allure-skipped-by-test-plan";
|
5 | export interface Crypto {
|
6 | uuid: () => string;
|
7 | md5: (str: string) => string;
|
8 | }
|
9 | export interface AttachmentMetadata {
|
10 | name: string;
|
11 | type: string;
|
12 | content: string;
|
13 | encoding: BufferEncoding;
|
14 | }
|
15 | export interface StepMetadata extends Omit<ExecutableItem, "attachments" | "steps"> {
|
16 | steps: StepMetadata[];
|
17 | attachments: AttachmentMetadata[];
|
18 | }
|
19 | export interface MetadataMessage {
|
20 | attachments?: AttachmentMetadata[];
|
21 | displayName?: string;
|
22 | testCaseId?: string;
|
23 | historyId?: string;
|
24 | labels?: Label[];
|
25 | links?: Link[];
|
26 | parameter?: Parameter[];
|
27 | description?: string;
|
28 | descriptionHtml?: string;
|
29 | steps?: StepMetadata[];
|
30 | }
|
31 | export interface Attachment {
|
32 | name: string;
|
33 | type: string;
|
34 | source: string;
|
35 | }
|
36 | export interface AttachmentOptions {
|
37 | contentType: ContentType | string;
|
38 | fileExtension?: string;
|
39 | }
|
40 | export interface Label {
|
41 | name: LabelName | string;
|
42 | value: string;
|
43 | }
|
44 | export interface Link {
|
45 | name?: string;
|
46 | url: string;
|
47 | type?: LinkType | string;
|
48 | }
|
49 | export interface Parameter {
|
50 | name: string;
|
51 | value: string;
|
52 | excluded?: boolean;
|
53 | mode?: "hidden" | "masked" | "default";
|
54 | }
|
55 | export type ParameterOptions = Pick<Parameter, "mode" | "excluded">;
|
56 | export interface StatusDetails {
|
57 | message?: string;
|
58 | trace?: string;
|
59 | }
|
60 | export interface ExecutableItem {
|
61 | name?: string;
|
62 | status?: Status;
|
63 | statusDetails: StatusDetails;
|
64 | stage: Stage;
|
65 | description?: string;
|
66 | descriptionHtml?: string;
|
67 | steps: StepResult[];
|
68 | attachments: Attachment[];
|
69 | parameters: Parameter[];
|
70 | start?: number;
|
71 | stop?: number;
|
72 | }
|
73 | export type FixtureResult = ExecutableItem;
|
74 | export type StepResult = ExecutableItem;
|
75 | export interface TestResult extends ExecutableItem {
|
76 | uuid: string;
|
77 | historyId: string;
|
78 | fullName?: string;
|
79 | testCaseId?: string;
|
80 | labels: Label[];
|
81 | links: Link[];
|
82 | }
|
83 | export interface TestResultContainer {
|
84 | uuid: string;
|
85 | name?: string;
|
86 | children: string[];
|
87 | befores: FixtureResult[];
|
88 | afters: FixtureResult[];
|
89 | }
|
90 | export interface Category {
|
91 | name?: string;
|
92 | description?: string;
|
93 | descriptionHtml?: string;
|
94 | messageRegex?: string | RegExp;
|
95 | traceRegex?: string | RegExp;
|
96 | matchedStatuses?: Status[];
|
97 | flaky?: boolean;
|
98 | }
|
99 | export interface ExecutorInfo {
|
100 | name?: string;
|
101 | type?: string;
|
102 | url?: string;
|
103 | buildOrder?: number;
|
104 | buildName?: string;
|
105 | buildUrl?: string;
|
106 | reportUrl?: string;
|
107 | reportName?: string;
|
108 | }
|
109 | export declare enum Status {
|
110 | FAILED = "failed",
|
111 | BROKEN = "broken",
|
112 | PASSED = "passed",
|
113 | SKIPPED = "skipped"
|
114 | }
|
115 | export declare enum Stage {
|
116 | SCHEDULED = "scheduled",
|
117 | RUNNING = "running",
|
118 | FINISHED = "finished",
|
119 | PENDING = "pending",
|
120 | INTERRUPTED = "interrupted"
|
121 | }
|
122 | export declare enum LabelName {
|
123 | ALLURE_ID = "ALLURE_ID",
|
124 | AS_ID = "ALLURE_ID",
|
125 | SUITE = "suite",
|
126 | PARENT_SUITE = "parentSuite",
|
127 | SUB_SUITE = "subSuite",
|
128 | EPIC = "epic",
|
129 | FEATURE = "feature",
|
130 | STORY = "story",
|
131 | SEVERITY = "severity",
|
132 | TAG = "tag",
|
133 | OWNER = "owner",
|
134 | LEAD = "lead",
|
135 | HOST = "host",
|
136 | THREAD = "thread",
|
137 | TEST_METHOD = "testMethod",
|
138 | TEST_CLASS = "testClass",
|
139 | PACKAGE = "package",
|
140 | FRAMEWORK = "framework",
|
141 | LANGUAGE = "language",
|
142 | LAYER = "layer"
|
143 | }
|
144 | export declare enum Severity {
|
145 | BLOCKER = "blocker",
|
146 | CRITICAL = "critical",
|
147 | NORMAL = "normal",
|
148 | MINOR = "minor",
|
149 | TRIVIAL = "trivial"
|
150 | }
|
151 | export declare enum ContentType {
|
152 | TEXT = "text/plain",
|
153 | XML = "application/xml",
|
154 | HTML = "text/html",
|
155 | CSV = "text/csv",
|
156 | TSV = "text/tab-separated-values",
|
157 | CSS = "text/css",
|
158 | URI = "text/uri-list",
|
159 | SVG = "image/svg+xml",
|
160 | PNG = "image/png",
|
161 | JSON = "application/json",
|
162 | ZIP = "application/zip",
|
163 | WEBM = "video/webm",
|
164 | JPEG = "image/jpeg",
|
165 | MP4 = "video/mp4"
|
166 | }
|
167 | export declare enum LinkType {
|
168 | ISSUE = "issue",
|
169 | TMS = "tms"
|
170 | }
|
171 | export interface ImageDiffAttachment {
|
172 | expected: string | undefined;
|
173 | actual: string | undefined;
|
174 | diff: string | undefined;
|
175 | name: string;
|
176 | }
|
177 | export interface AllureResults {
|
178 | tests: TestResult[];
|
179 | groups: TestResultContainer[];
|
180 | attachments: Record<string, Buffer | string>;
|
181 | envInfo?: Record<string, string | undefined>;
|
182 | categories?: Category[];
|
183 | }
|