Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@flakiness/playwright

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flakiness/playwright - npm Package Compare versions

Comparing version
0.151.0
to
0.152.0
+20
-8
lib/playwright-test.js

@@ -7,3 +7,4 @@ // src/playwright-test.ts

showReport,
SystemUtilizationSampler,
CPUUtilization,
RAMUtilization,
uploadReport,

@@ -31,2 +32,4 @@ writeReport

this._outputFolder = path.join(process.cwd(), this._options.outputFolder ?? process.env.FLAKINESS_OUTPUT_DIR ?? "flakiness-report");
this._sampleSystem = this._sampleSystem.bind(this);
this._sampleSystem();
}

@@ -37,3 +40,4 @@ _config;

_unattributedErrors = [];
_systemUtilizationSampler = new SystemUtilizationSampler();
_cpuUtilization = new CPUUtilization({ precision: 10 });
_ramUtilization = new RAMUtilization({ precision: 10 });
_report;

@@ -43,2 +47,8 @@ _attachments = [];

_result;
_telemetryTimer;
_sampleSystem() {
this._cpuUtilization.sample();
this._ramUtilization.sample();
this._telemetryTimer = setTimeout(this._sampleSystem, 1e3);
}
printsToStdio() {

@@ -163,3 +173,5 @@ return false;

async onEnd(result) {
this._systemUtilizationSampler.dispose();
clearTimeout(this._telemetryTimer);
this._cpuUtilization.sample();
this._ramUtilization.sample();
if (!this._config || !this._rootSuite)

@@ -220,6 +232,6 @@ throw new Error("ERROR: failed to resolve config");

const report = ReportUtils.normalizeReport({
version: 1,
category: "playwright",
commitId: worktree.headCommitId(),
relatedCommitIds: [],
systemUtilization: this._systemUtilizationSampler.result,
configPath,

@@ -229,3 +241,2 @@ url: CIUtils.runUrl(),

suites: await this._toFKSuites(context, this._rootSuite),
opaqueData: this._config,
unattributedErrors: this._unattributedErrors.map((e) => this._toFKTestError(context, e)),

@@ -235,3 +246,5 @@ duration: parseDurationMS(result.duration),

});
ReportUtils.createTestStepSnippetsInplace(worktree, report);
ReportUtils.collectSources(worktree, report);
this._cpuUtilization.enrich(report);
this._ramUtilization.enrich(report);
for (const unaccessibleAttachment of context.unaccessibleAttachmentPaths)

@@ -285,4 +298,3 @@ warn(`cannot access attachment ${unaccessibleAttachment}`);

name,
userSuppliedData: metadata,
opaqueData: { project }
metadata
}));

@@ -289,0 +301,0 @@ }

{
"name": "@flakiness/playwright",
"version": "0.151.0",
"version": "0.152.0",
"private": false,

@@ -17,3 +17,3 @@ "repository": {

"type": "module",
"description": "",
"description": "A custom Playwright test reporter that generates Flakiness Reports from your Playwright test runs",
"types": "./types/index.d.ts",

@@ -24,3 +24,11 @@ "scripts": {

},
"keywords": [],
"keywords": [
"playwright",
"test",
"reporter",
"flakiness",
"testing",
"e2e",
"test-reporting"
],
"author": "Degu Labs, Inc",

@@ -36,5 +44,5 @@ "license": "MIT",

"dependencies": {
"@flakiness/sdk": "^0.151.0",
"@flakiness/sdk": "^0.152.0",
"chalk": "^5.6.2"
}
}

@@ -9,3 +9,4 @@ import type { FullConfig, FullResult, Reporter, Suite, TestCase, TestError, TestResult } from '@playwright/test/reporter';

private _unattributedErrors;
private _systemUtilizationSampler;
private _cpuUtilization;
private _ramUtilization;
private _report?;

@@ -15,2 +16,3 @@ private _attachments;

private _result?;
private _telemetryTimer?;
constructor(_options?: {

@@ -23,2 +25,3 @@ endpoint?: string;

});
private _sampleSystem;
printsToStdio(): boolean;

@@ -25,0 +28,0 @@ onBegin(config: FullConfig, suite: Suite): void;

@@ -1,1 +0,1 @@

{"version":3,"file":"playwright-test.d.ts","sourceRoot":"","sources":["../../src/playwright-test.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EAEV,QAAQ,EACR,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAEvC,MAAM,2BAA2B,CAAC;AA6BnC,KAAK,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CA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