@alternative-path/testlens-playwright-reporter 0.4.2 → 0.4.4
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 +3 -3
- package/index.d.ts +3 -17
- package/index.js +133 -329
- package/index.ts +138 -355
- package/package.json +73 -83
- package/testlens-ca-bundle.pem +0 -88
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ A Playwright reporter for [TestLens](https://testlens.qa-path.com) - real-time t
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm
|
|
15
|
+
npm i @alternative-path/testlens-playwright-reporter
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Configuration
|
|
@@ -72,7 +72,7 @@ export default defineConfig({
|
|
|
72
72
|
trace: 'on',
|
|
73
73
|
},
|
|
74
74
|
reporter: [
|
|
75
|
-
['testlens-playwright-reporter', {
|
|
75
|
+
['@alternative-path/testlens-playwright-reporter', {
|
|
76
76
|
apiKey: process.env.TESTLENS_API_KEY || 'your-api-key-here',
|
|
77
77
|
|
|
78
78
|
// Optional: explicitly forward build metadata from env vars
|
|
@@ -96,7 +96,7 @@ module.exports = defineConfig({
|
|
|
96
96
|
trace: 'on',
|
|
97
97
|
},
|
|
98
98
|
reporter: [
|
|
99
|
-
['testlens-playwright-reporter', {
|
|
99
|
+
['@alternative-path/testlens-playwright-reporter', {
|
|
100
100
|
apiKey: process.env.TESTLENS_API_KEY || 'your-api-key-here',
|
|
101
101
|
|
|
102
102
|
// Optional: explicitly forward build metadata from env vars
|
package/index.d.ts
CHANGED
|
@@ -26,8 +26,6 @@ export interface TestLensReporterConfig {
|
|
|
26
26
|
rejectUnauthorized?: boolean;
|
|
27
27
|
/** Alternative SSL option - set to true to ignore SSL certificate errors */
|
|
28
28
|
ignoreSslErrors?: boolean;
|
|
29
|
-
/** Path to a custom CA certificate file (PEM format) to use for SSL verification */
|
|
30
|
-
caCertificate?: string;
|
|
31
29
|
/** Custom metadata from CLI arguments (automatically parsed from --key=value arguments) */
|
|
32
30
|
customMetadata?: Record<string, string | string[]>;
|
|
33
31
|
}
|
|
@@ -58,8 +56,6 @@ export interface TestLensReporterOptions {
|
|
|
58
56
|
rejectUnauthorized?: boolean;
|
|
59
57
|
/** Alternative SSL option - set to true to ignore SSL certificate errors */
|
|
60
58
|
ignoreSslErrors?: boolean;
|
|
61
|
-
/** Path to a custom CA certificate file (PEM format) to use for SSL verification */
|
|
62
|
-
caCertificate?: string;
|
|
63
59
|
/** Custom metadata from CLI arguments (automatically parsed from --key=value arguments) */
|
|
64
60
|
customMetadata?: Record<string, string | string[]>;
|
|
65
61
|
}
|
|
@@ -93,6 +89,7 @@ export interface RunMetadata {
|
|
|
93
89
|
os: string;
|
|
94
90
|
playwrightVersion: string;
|
|
95
91
|
nodeVersion: string;
|
|
92
|
+
testlensVersion?: string;
|
|
96
93
|
gitInfo?: GitInfo | null;
|
|
97
94
|
shardInfo?: {
|
|
98
95
|
current: number;
|
|
@@ -157,23 +154,13 @@ export interface SpecData {
|
|
|
157
154
|
export declare class TestLensReporter implements Reporter {
|
|
158
155
|
private config;
|
|
159
156
|
private axiosInstance;
|
|
160
|
-
/**
|
|
161
|
-
* Get bundled CA certificates for TestLens
|
|
162
|
-
* Combines custom CA bundle with Node.js root certificates
|
|
163
|
-
* This ensures SSL works with both testlens.qa-path.com and other HTTPS endpoints
|
|
164
|
-
*/
|
|
165
|
-
private static getBundledCaCertificates;
|
|
166
|
-
/**
|
|
167
|
-
* Automatically detect and load system CA certificates
|
|
168
|
-
* Uses bundled certificates as primary source, falls back to system certificates
|
|
169
|
-
*/
|
|
170
|
-
private static getSystemCaCertificates;
|
|
171
157
|
private runId;
|
|
172
158
|
private runMetadata;
|
|
173
159
|
private specMap;
|
|
174
160
|
private testMap;
|
|
175
161
|
private runCreationFailed;
|
|
176
162
|
private cliArgs;
|
|
163
|
+
private pendingUploads;
|
|
177
164
|
/**
|
|
178
165
|
* Parse custom metadata from environment variables
|
|
179
166
|
* Checks for common metadata environment variables
|
|
@@ -182,6 +169,7 @@ export declare class TestLensReporter implements Reporter {
|
|
|
182
169
|
constructor(options: TestLensReporterOptions);
|
|
183
170
|
private initializeRunMetadata;
|
|
184
171
|
private getPlaywrightVersion;
|
|
172
|
+
private getTestLensVersion;
|
|
185
173
|
private normalizeTestStatus;
|
|
186
174
|
private normalizeRunStatus;
|
|
187
175
|
onBegin(config: FullConfig, suite: Suite): Promise<void>;
|
|
@@ -200,8 +188,6 @@ export declare class TestLensReporter implements Reporter {
|
|
|
200
188
|
private getTestId;
|
|
201
189
|
private uploadArtifactToS3;
|
|
202
190
|
private getContentType;
|
|
203
|
-
private generateS3Key;
|
|
204
|
-
private sanitizeForS3;
|
|
205
191
|
private getFileSize;
|
|
206
192
|
}
|
|
207
193
|
export default TestLensReporter;
|