microsoft / playwright-test

Build a cross-browser end-to-end test suite with Playwright.
https://playwright.dev
Apache License 2.0
777 stars 34 forks source link

Allow overriding parameters in my config #199

Closed JoelEinbinder closed 3 years ago

JoelEinbinder commented 3 years ago

Right now it looks like all parameters are specified on the command line. This makes me have a long command to run my tests, like npx folio -p browserName=chromium. If you let me override the fixtures, you should also let me override the parameters. Or give me a config file like jest that lets me specify all the default parameters. Adding so many command line options is very awkward.

JoelEinbinder commented 3 years ago

Right now I am hacking around this by overriding browserType in my code:

fixtures.browserType.override(async({}, runTest) => {
  await runTest(chromium);
});

But this isn't ideal, because it makes browserName dangerous. If anyone touches browserName, it will cause my tests to run three times, and the browser name will be wrong if its not chromium.

mxschmitt commented 3 years ago

Closing since we have a config file now.