Skip to content

raptatinha/blog-playwright-bdd

Repository files navigation

blog-playwright-bdd

🇧🇷 Para Português, clique aqui.

Example for the article Playwright, BDD, Cucumber & my opinion about it

By Renata Andrade

If you find it useful, consider leaving a ⭐️ for this repo. Happy Testing 🎭!

Dependecies

  • Playwright v1.33.0
  • Cucumber v9.1.2
  • ts-node: v10.9.1
  • typescript: v5.0.4
  • Node v19.8.1
  • npm v9.6.5

Setup and Run

On your terminal, run:

  1. git clone https://github.com/raptatinha/blog-playwright-bdd.git
  2. cd blog-playwright-bdd
  3. npm i

To run the Cucumber tests (under /bdd-tests):

  1. npx cucumber-js

To run the playwright with and without bdd testes (under /tests):

  1. npx playwright test

The test "Has Title" is intentionally failing so we can see the reports.

To see the Cucumber report, open the file bdd-tests/reports/cucumber-report.html on your browser.

The Playwright report will open automatically on failures.

Important

For this project, coding good practices were not prioritizes since the main goal is to demo the usage of Playwright and BDD. Only the minimun setup was implemented for this demo.

More

🙌🏽 Kudos everyone!