Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@currents/playwright
Advanced tools
Playwright integration and reporting tool for [Currents](https://currents.dev/playwright) - a cloud dashboard for debugging, troubleshooting and analysing parallel CI tests supporting Cypress and Playwright.
Playwright integration and reporting tool for Currents - a cloud dashboard for debugging, troubleshooting and analysing parallel CI tests supporting Cypress and Playwright.
Make sure you already have Playwright installed, then run:
npm install @currents/playwright
use: {
// ...
trace: "on",
video: "on",
screenshot: "on",
}
Choose the preferred launch method:
pwc
CLI command - it runs playwright with a predefined configuration@currents/playwright
reporter to Playwright configuration filepwc
CLIWe need to pass three parameters to run pwc
:
The command passes down all the other CLI flags to the Playwright test runner as-is. We can pass these as command line arguments, as environment variables, or a mixture of both.
pwc --project-id PROJECT_ID --key RECORD_KEY --ci-build-id hello-currents --tag tagA,tagB
@currents/playwright
reporterAlternatively, you can manually add the reporter to playwright configuration and keep using playwright test
CLI command.
import type { PlaywrightTestConfig } from "@playwright/test";
import { currentsReporter } from '@currents/playwright';
const currentsConfig = {
ciBuildId: process.env.CURRENTS_CI_BUILD_ID,
recordKey: process.env.CURRENTS_RECORD_KEY,
projectId: process.env.CURRENTS_PROJECT_ID,
tag: ["runTagA", "runTagB"],
};
const config: PlaywrightTestConfig = {
// explicitly provide reporter name and configuration
[
"@currents/playwright",
currentsConfig
],
// ...or use the helper function that ensures type safety
currentsReporter(currentsConfig),
/* other reporters, if exist, e.g.:
["html"]
*/
};
export default config;
You can also provide configuration by setting environment variables before running playwright
command
CURRENTS_RECORD_KEY=RECORD_KEY CURRENTS_PROJECT_ID=PROJECT_ID CURRENTS_CI_BUILD_ID=hello-currents CURRENTS_TAG=tagA,tagB npx playwright test
Check out the example repository for integrating with GitHub Actions: https://github.com/currents-dev/playwright-gh-actions-demo, including parallel runs on multiple machines using Playwright shards.
Here’s a quick reference to configuration files:
pwc
executable scriptBy default Playwright only captures screenshots at the end of a test, according to the provided screenshot option. Manually created screenshots are hidden by default and not attached to any test.
To send additional screenshots to Currents, they have to be attached to the test. For example, you can attach a screenshot to a test like this
const { test, expect } = require("@playwright/test");
test("basic test", async ({ page }, testInfo) => {
await page.goto("https://playwright.dev");
const screenshot = await page.screenshot();
await testInfo.attach("screenshot", {
body: screenshot,
contentType: "image/png",
});
});
For more information see the Playwright test info attachment documentation.
FAQs
Playwright integration and reporter for [Currents](https://currents.dev/playwright) - a cloud dashboard for debugging, troubleshooting and analysing parallel CI tests supporting Cypress and Playwright.
The npm package @currents/playwright receives a total of 28,900 weekly downloads. As such, @currents/playwright popularity was classified as popular.
We found that @currents/playwright demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.