@testomatio/reporter 2.9.1 → 2.9.2-beta.1-allure-retries

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 CHANGED
@@ -76,6 +76,7 @@ npx testomatio-reporter <command> [options]
76
76
  | [TestCafe](./docs/frameworks.md#testcafe) | [Detox](./docs/frameworks.md#detox) | [Codeception](https://github.com/testomatio/php-reporter) |
77
77
  | [Newman (Postman)](./docs/frameworks.md#newman) | [JUnit](./docs/junit.md#junit) | [NUnit](./docs/junit.md#nunit) |
78
78
  | [PyTest](./docs/junit.md#pytest) | [PHPUnit](./docs/junit.md#phpunit) | [Protractor](./docs/frameworks.md#protractor) |
79
+ | [Allure](./docs/allure.md) | | |
79
80
 
80
81
  or **any [other via JUnit](./docs/junit.md)** report....
81
82
 
@@ -137,9 +138,10 @@ Bring this reporter on CI and never lose test results again!
137
138
  - [HTML report](./docs/pipes/html.md)
138
139
  - [Markdown report](./docs/pipes/markdown.md)
139
140
  - [Bitbucket](./docs/pipes/bitbucket.md)
140
- - 🔗 [Linking Tests](./docs/linking-tests.md)
141
- - 📓 [JUnit](./docs/junit.md)
141
+ - 📓 [JUnit Reports](./docs/junit.md)
142
142
  - 🗄️ [Artifacts](./docs/artifacts.md)
143
+ - 🔬 [Allure Reports](./docs/allure.md)
144
+ - 🔗 [Linking Tests](./docs/linking-tests.md)
143
145
  - 🔂 [Workflows](./docs/workflows.md)
144
146
  - 🖊️ [Logger](./docs/logger.md)
145
147
  - 🪲 [Debug File Format](./docs/debug-file-format.md)
@@ -0,0 +1,121 @@
1
+ export default AllureReader;
2
+ declare class AllureReader {
3
+ constructor(opts?: {});
4
+ requestParams: {
5
+ apiKey: any;
6
+ url: any;
7
+ title: string;
8
+ env: string;
9
+ group_title: string;
10
+ batchMode: "manual";
11
+ };
12
+ runId: any;
13
+ opts: {};
14
+ withPackage: any;
15
+ store: {};
16
+ pipesPromise: Promise<any[]>;
17
+ _tests: any[];
18
+ stats: {};
19
+ suites: {};
20
+ uploader: S3Uploader;
21
+ version: any;
22
+ set tests(value: any[]);
23
+ get tests(): any[];
24
+ createRun(): Promise<any[]>;
25
+ pipes: any;
26
+ parse(resultsPattern: any): {};
27
+ parseContainerFiles(containerFiles: any): void;
28
+ processAllureResult(result: any, resultsDir: any): {
29
+ rid: any;
30
+ title: any;
31
+ status: any;
32
+ suite_title: any;
33
+ file: string;
34
+ run_time: number;
35
+ steps: any;
36
+ message: any;
37
+ stack: any;
38
+ meta: {};
39
+ links: {
40
+ label: string;
41
+ }[];
42
+ artifacts: any[];
43
+ create: boolean;
44
+ overwrite: boolean;
45
+ };
46
+ mapStatus(status: any): any;
47
+ /**
48
+ * Map an Allure step status to the Testomat.io Step status enum
49
+ * (`passed | failed | none | custom`, see testomat-api-definition.yml).
50
+ *
51
+ * Allure marks a step `broken` when it threw an unexpected error — that is a
52
+ * failure for reporting purposes, matching how `mapStatus` treats tests.
53
+ * `skipped` and anything unknown/absent become `none` (the neutral value),
54
+ * since the step enum has no `skipped`.
55
+ *
56
+ * @param {string} status - Allure step status
57
+ * @returns {'passed'|'failed'|'none'} Testomat.io step status
58
+ */
59
+ mapStepStatus(status: string): "passed" | "failed" | "none";
60
+ extractSuiteTitle(result: any): any;
61
+ stripNamespace(suiteName: any): any;
62
+ extractFile(result: any): string;
63
+ getFileExtension(result: any): any;
64
+ extractMeta(result: any): {};
65
+ extractLinks(result: any): {
66
+ label: string;
67
+ }[];
68
+ /**
69
+ * Extract a Testomat.io test id from Allure links so reported tests match
70
+ * existing cases instead of creating duplicates.
71
+ *
72
+ * Allure's `@TmsLink("T1a2b3c4d")` produces a link with `type: "tms"`. Some exporters
73
+ * omit the type but still point the link URL at a Testomat.io test page; both are
74
+ * accepted. The link `name` is used as the id (falling back to the last URL segment).
75
+ *
76
+ * @param {object} result - Parsed Allure result JSON
77
+ * @returns {string|null} Normalized test id, or null when no usable link exists
78
+ */
79
+ extractTestId(result: object): string | null;
80
+ /**
81
+ * Normalize a value into a Testomat.io test id.
82
+ *
83
+ * Testomat.io test ids are exactly **8 word characters**. The value may arrive bare
84
+ * (`1a2b3c4d`), or carrying the `T` / `@T` markers Testomat uses in code and titles
85
+ * (`T1a2b3c4d`, `@T1a2b3c4d`). The markers are removed only when doing so still leaves
86
+ * a valid 8-char id, so a real id that happens to start with `T` is preserved.
87
+ *
88
+ * Anything that does not resolve to a valid 8-char id — a numeric Allure TestOps id
89
+ * like `12345`, a JIRA key, a 6-digit TMS number — is rejected (returns null) so we
90
+ * never send an unmatchable id that would create duplicates.
91
+ *
92
+ * @param {string|number|null|undefined} value
93
+ * @returns {string|null} The bare 8-char id, or null when the value is not a valid id
94
+ */
95
+ normalizeTestId(value: string | number | null | undefined): string | null;
96
+ convertSteps(steps: any, depth?: number): any;
97
+ /**
98
+ * Build the `error` payload for a failed step from its Allure `statusDetails`.
99
+ *
100
+ * Allure stores the failure message and stack trace (which includes the failing
101
+ * source line) in `statusDetails` on the step itself. We only surface it for
102
+ * failed/broken steps — passing or skipped steps carry no error. Returns null
103
+ * when there is no usable failure information so the field is omitted entirely.
104
+ *
105
+ * @param {object} step - Allure step
106
+ * @returns {{message: string, stack: string}|null}
107
+ */
108
+ extractStepError(step: object): {
109
+ message: string;
110
+ stack: string;
111
+ } | null;
112
+ calculateRunTime(item: any): number;
113
+ convertParameters(parameters: any): {};
114
+ combineRetryAttempts(attempts: any): any;
115
+ calculateStats(): {};
116
+ fetchSourceCode(): void;
117
+ getLanguage(): any;
118
+ uploadArtifacts(): Promise<void>;
119
+ uploadData(): Promise<any[]>;
120
+ }
121
+ import { S3Uploader } from './uploader.js';