cmoir / playwright_pytest_bdd_example

27 stars 13 forks source link

Command #1

Closed virginiasacudato closed 1 year ago

virginiasacudato commented 1 year ago

What command do you use to run the project in console..?

cmoir commented 1 year ago

Hi, this project uses pytest as the test runner. Please update to the latest code as I have removed the x-dist dependency to simplify the command

Use "pytest" to run all the tests

Other examples Use "pytest tests/test_without_bdd.py" to run all the tests in the test_without_bdd module Use "pytest tests/test_without_bdd.py::test_select_numbers_link" to run the test_select_numbers_link test

See the pytest docs for my other methods https://docs.pytest.org/en/7.1.x/how-to/usage.html

The playwright docs also have examples such as if you want to run in firefox add --browser firefox onto the command line https://playwright.dev/python/docs/running-tests

Finally this project sets some defaults in the pytest.ini file, such as running in headed mode