Skip to content

Instantly share code, notes, and snippets.

@idembele70
Last active July 11, 2024 16:34
Show Gist options
  • Save idembele70/addc5d4e84dc046fe363beae836a77d8 to your computer and use it in GitHub Desktop.
Save idembele70/addc5d4e84dc046fe363beae836a77d8 to your computer and use it in GitHub Desktop.

Playwright usefull ressources

Running tests with specific Tags name

npx playwright test --grep @<YOUR_TAG_NAME>
npx playwright test -g @<YOUR_TAG_NAME>

Running test with multiple Tags name

npx playwright test --grep "@<YOUR_FIRST_TAG_NAME>|@<YOUR_SECOND_TAG_NAME>|@<YOUR_THIRD_TAG_NAME>"
npx playwright test -g "@<YOUR_FIRST_TAG_NAME>|@<YOUR_SECOND_TAG_NAME>|@<YOUR_THIRD_TAG_NAME>"

Learning and developping !

  1. Learning end-to-end testing
  2. API Testing example
  3. Playwright API testing demo
  4. Playwright ressources

Reference:

  1. https://medium.com/@pothiwalapranav/running-playwright-tests-with-multiple-grep-patterns-c602528f6649
  2. https://playwrightsolutions.com/run-a-subset-of-tests-with-grep-and-grep-invert-in-package-json/

Setup & Teardown

  1. Few description related to playwright fixtures and how to use it properly and the order beetween the hook fixtures, beforeAll, afterAll, beforeEach, afterEach. Conclusion: Fixtures is there to set hooks before or After each test in playwright.

REFERENCES:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment