Playwright Quickstart
Learn how to setup visual testing using the Argos Playwright SDK.
Prerequisites
1
2
Setup Argos in your Playwright config
import { defineConfig } from "@playwright/test";
import { createArgosReporterOptions } from "@argos-ci/playwright/reporter";
export default defineConfig({
// ... other configuration
// Reporter to use
reporter: [
// Use "dot" reporter on CI, "list" otherwise (Playwright default).
process.env.CI ? ["dot"] : ["list"],
// Add Argos reporter.
[
"@argos-ci/playwright/reporter",
createArgosReporterOptions({
// Upload to Argos on CI only.
uploadToArgos: !!process.env.CI,
// Set your Argos token (required if not using GitHub Actions).
token: "<YOUR-ARGOS-TOKEN>",
}),
],
],
// Setup recording option to enable test debugging features.
use: {
// Collect trace when retrying the failed test.
trace: 'on-first-retry',
// Capture screenshot after each test failure.
screenshot: "only-on-failure",
},
});Congratulations on installing Argos! 👏
Additional resources
Last updated
Was this helpful?