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

Add ability to run test suite for just one metric #286

Closed
wants to merge 6 commits into from

Conversation

tunetheweb
Copy link
Member

Quite often I want to run just one set of tests (e.g. just the INP tests), rather than waiting for full suite to be run.

This PR allows this to be done without having to override the config in wdio.conf.js (and often forgetting to un-override it).

To run just INP tests, start the server and run:

npm run test:e2e -- --suite INP

To run just FID and INP tests, start the server and run:

npm run test:e2e -- --suite FID --suite INP

Note the -- at the beginning needed to show the is an argument for the inner script, and not npm itself.

@philipwalton
Copy link
Member

I think this approach is fine, but as far as I can tell this doesn't allow you to specify just running the tests in a certain browser, so it may end up being nicer to just manually parse the command line flags to specify the behavior, rather than using webdriverio's --suite option.

For example, I think being able to do something like this would be nice:

npm test --methods=onINP --browsers=Chrome

(Or something like that)

I believe there are lots of npm modules that can help parse command line flag, but I'm not sure what's the latest and greatest there...

@tunetheweb tunetheweb closed this Apr 4, 2024
This was referenced Apr 4, 2024
@tunetheweb tunetheweb deleted the individual-metric-test-runs branch May 2, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants