@lokalise/playwright-reporters 1.9.1 → 1.9.2
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.
|
@@ -10,8 +10,12 @@ export interface CIContext {
|
|
|
10
10
|
commitSha?: string;
|
|
11
11
|
/** Pull request number */
|
|
12
12
|
prNumber?: string;
|
|
13
|
-
/** CI job identifier */
|
|
13
|
+
/** CI job identifier (numeric ID) */
|
|
14
14
|
ciJobId?: string;
|
|
15
|
+
/** CI job name (e.g., 'lokalise-main/PR-123') */
|
|
16
|
+
jobName?: string;
|
|
17
|
+
/** CI build number */
|
|
18
|
+
buildNumber?: string;
|
|
15
19
|
/** What triggered the run (push, pr, schedule, manual) */
|
|
16
20
|
triggeredBy?: string;
|
|
17
21
|
}
|
package/dist/datadog/reporter.js
CHANGED
|
@@ -236,6 +236,8 @@ class DatadogReporter {
|
|
|
236
236
|
env: this.options.env,
|
|
237
237
|
service: this.options.service ?? 'playwright-tests',
|
|
238
238
|
product: this.options.product,
|
|
239
|
+
jobName: this.options.ci?.jobName,
|
|
240
|
+
buildNumber: this.options.ci?.buildNumber,
|
|
239
241
|
};
|
|
240
242
|
// Build metrics payload
|
|
241
243
|
const payload = (0, transform_1.buildMetricsPayload)(runMetrics, this.testMetrics, baseTags);
|
|
@@ -33,6 +33,12 @@ const formatTags = (tags) => {
|
|
|
33
33
|
if (tags.product) {
|
|
34
34
|
formattedTags.push(`product:${tags.product}`);
|
|
35
35
|
}
|
|
36
|
+
if (tags.jobName) {
|
|
37
|
+
formattedTags.push(`job_name:${tags.jobName}`);
|
|
38
|
+
}
|
|
39
|
+
if (tags.buildNumber) {
|
|
40
|
+
formattedTags.push(`build_number:${tags.buildNumber}`);
|
|
41
|
+
}
|
|
36
42
|
return formattedTags;
|
|
37
43
|
};
|
|
38
44
|
exports.formatTags = formatTags;
|
|
@@ -100,10 +106,8 @@ const transformTestRunMetrics = (runMetrics, baseTags) => {
|
|
|
100
106
|
if (runMetrics.navigationMs > 0) {
|
|
101
107
|
series.push(createDistribution('test_run.navigation_ms', runMetrics.navigationMs, timestamp, tags, 'millisecond'));
|
|
102
108
|
}
|
|
103
|
-
// Retry time
|
|
104
|
-
|
|
105
|
-
series.push(createDistribution('test_run.retry_time_ms', runMetrics.retryTimeMs, timestamp, tags, 'millisecond'));
|
|
106
|
-
}
|
|
109
|
+
// Retry time - always send for consistent dashboard visibility (0 means no retries)
|
|
110
|
+
series.push(createDistribution('test_run.retry_time_ms', runMetrics.retryTimeMs, timestamp, tags, 'millisecond'));
|
|
107
111
|
// Worker count
|
|
108
112
|
if (runMetrics.workerCount > 0) {
|
|
109
113
|
series.push(createGauge('test_run.worker_count', runMetrics.workerCount, timestamp, tags));
|