Playwright Run a Single Test File

  • We can run a single test file from the CLI in playwright using this command.
npx playwright test tests/testName.spec.ts
  • Use this if you want to run it in headless or headed mode.
npx playwright test tests/dbl.spec.js --headless
npx playwright test tests/dbl.spec.js --headed
  • If you want the test to run in a specific browser, use this.
npx playwright test tests/dbl.spec.js --headed --project='chromium'
Mon, 01/30/2023 - 10:12
Ashwin possesses over five years of experience in the Quality Assurance industry and is currently serving as a Technical Lead at iVagus. His expertise encompasses a broad range of technologies, including Cypress, Rest Assured, Selenium, Cucumber, JavaScript and TypeScript.
Tags

Comments