https://github.com/currents-dev/currents-playwright-bdd-cucumber-example
This repository showcases running Playwright + Currents + playwright-bdd to run BDD tests, while using Currents as the reporting dashboard.
https://github.com/currents-dev/currents-playwright-bdd-cucumber-example
Last synced: 11 months ago
JSON representation
This repository showcases running Playwright + Currents + playwright-bdd to run BDD tests, while using Currents as the reporting dashboard.
- Host: GitHub
- URL: https://github.com/currents-dev/currents-playwright-bdd-cucumber-example
- Owner: currents-dev
- Created: 2024-01-24T23:27:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-24T23:29:48.000Z (about 2 years ago)
- Last Synced: 2025-03-25T04:52:20.923Z (11 months ago)
- Language: TypeScript
- Size: 174 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playwright + Currents + playwright-bdd (Cucumber)
This repository showcases running [Playwright](https://playwright.dev) + [Currents](https://currents.dev) + [playwright-bdd](https://github.com/vitalets/playwright-bdd) to run BDD tests, while using [Currents](https://currents.dev) 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](https://github.com/vitalets/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):
- [features/homepage.feature](features/homepage.feature) - has intentionally failing test
- [features/todopage.feature](features/todopage.feature)
To reproduce the setup:
- Create an organization, get your **Record Key** and **Project Id** at https://app.currents.dev
- Clone repo
- Install dependencies
```sh
npm install
```
- Install browsers
```sh
npx playwright install
```
- Set **Record Key** and **Project Id** in `playwright.config.ts`
- Run tests
```sh
npm test
```
Output:
```plain
===============================================
Uploading results to Currents.dev...
Cloud Run Finished: https://app.currents.dev/run/1f2e431c6d46675e
================================================
```
Additional resources:
- Playwright Features on Currents: https://currents.dev/playwright
- Integration Documentation: https://currents.dev/readme/integration-with-playwright/currents-playwright
- CI Build ID Guide: https://currents.dev/readme/guides/ci-build-id
## 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:


-