1.6.2 • Published 1 month ago

@currents/playwright v1.6.2

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
1 month ago

@currents/playwright

Playwright integration and reporter for Currents - a cloud dashboard for debugging, troubleshooting and analysing parallel CI tests supporting Cypress and Playwright.

npm version npm dm npm dt


Requirements

  • NodeJS 14.0.0+
  • Playwright 1.22.2+

Install

npm install @currents/playwright

Enable traces, screenshots and videos

use: {
  // ...
  trace: "on",
  video: "on",
  screenshot: "on",
}

Usage

Choose the preferred launch method:

  • executing a pwc CLI command - it runs playwright with a predefined configuration
  • add @currents/playwright reporter to Playwright configuration file

pwc CLI

We need to pass three parameters to run pwc:

  • our record key
  • the project ID, which is created when you create a project in the Current dashboard
  • the CI build ID

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 reporter

Alternatively, 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 = {
  reporter: [currentsReporter(currentsConfig)],
};

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

Examples

Run all tests in the current directory:

pwc --key <record-key> --project-id <id> --ci-build-id <build-id>

Run only tests filtered by the tag "@smoke":

pwc --key <record-key> --project-id <id> --ci-build-id <build-id> --grep smoke

Run playwright tests and add tags "tagA", "tagB" to the recorded run:

pwc --key <record-key> --project-id <id> --ci-build-id <build-id> --tag tagA --tag tagB

Provide playwright arguments and flags:

pwc --key <record-key> --project-id <id> --ci-build-id <build-id> -- --workers 2 --timeout 10000 --shard 1/2

CI Integrations

Check out the example repositories that showcase running Playwright tests on popular CI providers and recording the results to Currents:

Explore how to speed up CI Playwright runs by running enabling pw-parallelization.

Documentation

Explore our comprehensive guides and documentation:

1.6.2

1 month ago

1.6.1

1 month ago

1.6.0

1 month ago

1.5.12

2 months ago

1.5.11

2 months ago

1.6.0-beta.4

2 months ago

1.6.0-beta.5

2 months ago

1.6.0-beta.1

3 months ago

1.6.0-beta.2

3 months ago

1.6.0-beta.3

3 months ago

1.6.0-beta.0

3 months ago

1.5.10

3 months ago

1.5.9

3 months ago

1.5.8

3 months ago

1.5.5

4 months ago

1.5.4

4 months ago

1.5.3

4 months ago

1.5.2

4 months ago

1.5.0

4 months ago

1.4.6

4 months ago

1.4.5

5 months ago

1.4.3

5 months ago

1.4.2

5 months ago

1.4.1

5 months ago

1.4.0

6 months ago

1.5.7

3 months ago

1.5.6

3 months ago

1.4.3-beta.0

5 months ago

1.4.3-beta.1

5 months ago

1.3.3

6 months ago

1.3.2

6 months ago

1.3.1

6 months ago

1.3.0

6 months ago

1.2.0

7 months ago

1.2.0-beta.0

7 months ago

1.1.9-alpha.0

7 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.1

8 months ago

1.1.2

8 months ago

0.12.3

8 months ago

1.0.1

8 months ago

1.1.0

8 months ago

1.0.0-beta.6

9 months ago

1.0.0-beta.7

8 months ago

0.12.2

9 months ago

1.0.0-beta.5

9 months ago

1.0.0-beta.4

9 months ago

1.0.0-beta.3

9 months ago

1.0.0-beta.2

9 months ago

1.0.0-beta.1

9 months ago

1.0.0-beta.0

9 months ago

0.12.0-alpha.8

10 months ago

0.12.1

10 months ago

0.12.0-alpha.7

10 months ago

0.12.0-alpha.5

10 months ago

0.12.0-alpha.6

10 months ago

0.12.0

10 months ago

0.12.0-alpha.2

11 months ago

0.12.0-alpha.3

11 months ago

0.12.0-alpha.4

11 months ago

0.12.0-alpha.1

11 months ago

0.11.5

11 months ago

0.11.5-beta.0

11 months ago

0.11.3

12 months ago

0.11.4

12 months ago

0.11.3-beta.1

12 months ago

0.11.3-beta.0

12 months ago

0.11.2

12 months ago

0.11.0-beta.0

12 months ago

0.11.0

12 months ago

0.11.1

12 months ago

0.9.0

1 year ago

0.7.2

1 year ago

0.6.4-beta.0

1 year ago

0.7.1

1 year ago

0.7.0

1 year ago

0.10.9

1 year ago

0.10.1

1 year ago

0.10.0-beta.2

1 year ago

0.10.2

1 year ago

0.10.3

1 year ago

0.10.0-beta.0

1 year ago

0.10.4

1 year ago

0.10.0-beta.1

1 year ago

0.10.5

1 year ago

0.10.6

1 year ago

0.10.7

1 year ago

0.10.8

1 year ago

0.10.0

1 year ago

0.10.8-beta.0

1 year ago

0.8.1

1 year ago

0.6.3

1 year ago

0.8.0

1 year ago

0.6.2

1 year ago

0.6.4

1 year ago

0.5.0-beta.1

1 year ago

0.5.0-beta.0

1 year ago

0.5.0-beta.2

1 year ago

0.3.8-beta.0

2 years ago

0.5.0

1 year ago

0.4.1

2 years ago

0.4.0

2 years ago

0.6.1

1 year ago

0.4.2

2 years ago

0.3.5-beta.1

2 years ago

0.3.5-beta.0

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.7

2 years ago

0.3.4

2 years ago

0.1.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.2

2 years ago

0.3.3

2 years ago

1.0.0

2 years ago