Hello,
I'm not sure what's going on but whenever I run npx playwright test
without any arguments, it is only running a single test file (the last test file I was writing) instead of all test files. However, when I run npx playwright test --list
, it will show all the test files, as expected. I am using @playwright/[email protected]
and [email protected]
. Please help!
This thread is trying to answer question "Why is Playwright only running a single test file instead of all test files?"
It can be a config issue…. I would suggest you to check value you have mentioned in testdir parameter in config file. Refer to below link for details
https://playwright.dev/docs/api/class-testproject#test-project-test-dir
.
├── ...
├── playwright.config.ts
├── e2e
│ ├── fixtures
│ │ ├── ...
│ │ └── ...
│ ├── pageObjects
│ │ ├── ...
│ │ └── ...
│ ├── specs
│ │ ├── subDirA
│ │ │ ├── some-test-a.spec.ts
│ │ │ └── another-test-a.spec.ts
│ │ ├── subDirB
│ │ │ ├── some-test-b.spec.ts
│ │ │ └── another-test-b.spec.ts
│ │ ├── some-test.spec.ts
│ │ └── another-test.spec.ts
│ └── tsconfig.json
└── ...
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].