microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
63.9k stars 3.46k forks source link

[Feature] Get actual filtered (after CLI args were processed) projects inside globalSetup #14031

Closed oytunerdd closed 1 year ago

oytunerdd commented 2 years ago

Hello,

Playwrights Configuration and Advanced Configurations docs and related reported issues doesn't give any information about, which environment-projects or option is used to trigger the tests on command line. Hence cannot reach with which options playwright is runned. Advanced Configuration handles this problem like below,

const { baseURL, storageState } = config.projects[0].use;

but in this case this project usage is for dev-prod environment there is no way of reaching the values of these projects automatically. Rather statically the indexed versions. The only way of reaching this information can be done by passing for example backendURL as a parameter to test definitions. But when you have deeper class definitions you have to give backendURL as parameter to test definition then carry that in deeper methods which gives you some configuration flaws. Am opening this information request for other closed github issues https://github.com/microsoft/playwright/issues/10553

mxschmitt commented 2 years ago

Playwrights Configuration and Advanced Configurations docs and related reported issues doesn't give any information about, which environment-projects or option is used to trigger the tests on command line

Let's use this as a feature request, having to the actual filtered config would fix your scenario I guess.

oytunerdd commented 1 year ago

Any updates on this one ? @mxschmitt

pavelfeldman commented 1 year ago

Why was this issue closed?

Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.