0

I have a playwright project that has many sub folders under the tests folder, for example a, b, and c.

In a specific scenario on one of my pipelines I need to exclude the folder c using Playwright CLI.

Please note that I don't want to create a dedicated playwright.config file, nor setting a dedicated playwright project. (no change to the source code at all)

Only thing I found is a way to specify the wanted folders like so npx playwright test tests/todo-page/, but not the other way around.

Is there any possible way to exclude that folder?

1 Answer 1

3

You can use --grep-invert as the folder structure is part of the test name. To exclude e.g. tests/smoke:

npx playwright test --grep-invert "^tests\/smoke"

Source: Playwright CLI docs

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.