Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I receive "Error: No tests found" trying to perform selective run of playwright autotests #889

Open
dolkonsVK opened this issue Feb 26, 2024 · 3 comments
Assignees
Labels
theme:playwright type:bug Something isn't working

Comments

@dolkonsVK
Copy link

dolkonsVK commented Feb 26, 2024

Describe the bug
In my project repository tests are organized the following way:

project1
   - tests/...
   - playwright.config.ts
project2
   - tests
   - playwright.config.ts
project3
   - tests
   - playwright.config.ts

Each playwright.config.ts file has grep: testPlanFilter(), added according to the documentation (https://github.com/allure-framework/allure-js/blob/main/packages/allure-playwright/README.md#selective-test-execution) but every time I try to selectively run tests on either CICD or locally (through the testplan.json file) I'm always getting the error "Error: No tests found". It seems like somehow the parsing of tests selectors does not work as expected. Any help, advice or some information would be really appreciated, thx.

To Reproduce
Steps to reproduce the behavior:

  1. Use playwright framework
  2. Try to organize the test the way described above
  3. Try to run tests locally through the testplan.json

Expected behavior
Tests are running as expected

Additional context
pw version: "@playwright/test": "^1.41.0",
The content of "testplan.json" is the following:
{"version":"1.0","tests":[{"id":123,"selector":"tests/tests.spec.ts#smth from describe GIVEN smth WHEN smth THEN smth"}]}

@dolkonsVK
Copy link
Author

dolkonsVK commented Mar 1, 2024

I managed to reproduce the issue on a dummy project that I attached.
This project contains two folders "project1" and "project2". Each "project" folder has its own "tests" folder and playwright.config.ts respectively.
Also I pasted testplan.json file in both root and "project1" directories. Attempt to run test using testplan.json from both root and "project1" repository had no luck.
test_project.zip

Also attached a video with the steps I followed:
https://drive.google.com/file/d/10ViF7ic8bXODXe30GXoRcZ9lQwvXMb_W/view?usp=sharing

@epszaw epszaw added type:bug Something isn't working theme:playwright labels Mar 7, 2024
@epszaw epszaw self-assigned this Mar 7, 2024
@dolkonsVK
Copy link
Author

any update on that?

@epszaw
Copy link
Member

epszaw commented Mar 28, 2024

Hey, @dolkonsVK! Unfortunately, there isn't any update now. I'll notify you when I start investigating the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:playwright type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants