Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
playwright-merge-summary-json-reports
Advanced tools
A package that will make it easy to merge summary.json files output from playwright customer reporter playwright-json-summary-reporter.
This package works in tandem with:
The walk through found on https://playwrightsolutions.com.
The above package will generate a summary.json
report after the Playwright run, while this package will combine multiple summary.json
files into 1 file after a run with the --shard=x/x
command.
npm install playwright-merge-summary-json-reports --save-dev
Create a new file file in the appropriate directory
// lib/metrics/mergeReports.ts
import fs from "fs";
import path from "path";
import { mergeHTMLReports } from "playwright-merge-html-reports";
import { mergeSummary } from "playwright-merge-summary-json-reports";
const reportPathsToMerge = fs
.readdirSync(process.cwd() + "/playwright-report", { withFileTypes: true })
.filter((item) => item.isDirectory())
.map(({ name }) => path.resolve(process.cwd() + "/playwright-report", name));
async function runReport(paths: string[]) {
// merges the summary.json in each report-x folder and saves a summary.json to root directory
await mergeSummary(paths);
// merges html reports and saves to /html-report
await mergeHTMLReports(paths, {
outputFolderName: "html-report",
});
}
runReport(reportPathsToMerge);
After a test run, where there is a folder /playwright-report
with multiple sub-folders /report-1
, /report-2/
, etc. Running the command npx ts-node lib/metrics/mergeReports.ts
will search through the folders for both html and json reports and combine them, and output the html report to html-report
and the combined summary.json to the main directory.
If you found this helpful feel free to check out https://playwrightsolutions.com!
FAQs
A package that will make it easy to merge summary.json files output from playwright customer reporter playwright-json-summary-reporter.
The npm package playwright-merge-summary-json-reports receives a total of 4,711 weekly downloads. As such, playwright-merge-summary-json-reports popularity was classified as popular.
We found that playwright-merge-summary-json-reports demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.