Skip to content

This repository showcases running Playwright + Currents + playwright-bdd to run BDD tests, while using Currents as the reporting dashboard.

Notifications You must be signed in to change notification settings

currents-dev/currents-playwright-bdd-cucumber-example

Repository files navigation

Playwright + Currents + playwright-bdd (Cucumber)

This repository showcases running Playwright + Currents + playwright-bdd to run BDD tests, while using Currents as the reporting dashboard.

Why?

cucumber-js is a mature and popular test runner, however, it is different from the native Playwright test runner - those are not compatible. To utilize the native Playwright test runner with BDD it is suggested to use playwright-bdd.

Read more at: https://www.cy2pw.com/cucumber.

Documentation

The repo contains a few BDD tests with one test that always fails (intentionally):

To reproduce the setup:

  • Create an organization, get your Record Key and Project Id at https://app.currents.dev

  • Clone repo

  • Install dependencies

    npm install
  • Install browsers

    npx playwright install
  • Set Record Key and Project Id in playwright.config.ts

  • Run tests

    npm test

    Output:

     ===============================================
     Uploading results to Currents.dev...
     Cloud Run Finished: https://app.currents.dev/run/1f2e431c6d46675e
     ================================================
    

Additional resources:

Results

The results are being reported to Currents for more efficient troubleshooting, and monitoring test suite flakiness and performance.

Currents will collect the following information:

  • console output
  • screenshots
  • videos
  • trace files
  • timing
  • outcomes
  • flaky tests
  • error details
  • tags for more convenient management of the tests:

currents-2024-01-24-15 26 34@2x

currents-2024-01-24-15 29 19@2x

About

This repository showcases running Playwright + Currents + playwright-bdd to run BDD tests, while using Currents as the reporting dashboard.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published