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

Filter tests that run #51

Closed
SteveDesmond-ca opened this issue Aug 3, 2021 · 3 comments
Closed

Filter tests that run #51

SteveDesmond-ca opened this issue Aug 3, 2021 · 3 comments
Labels
feature Additional or changing functionality small Just a few hours of work

Comments

@SteveDesmond-ca
Copy link
Member

As a developer with a giant test suite, I want to only run a subset of tests, so that I don't need to wait as long to see results.

Acceptance criteria:

  • user can add a CLI arg to filter tests that run based on a {regex? glob?} pattern
@SteveDesmond-ca SteveDesmond-ca added help wanted Extra attention is needed enhancement labels Aug 3, 2021
@ghost
Copy link

ghost commented Aug 28, 2021

Many test frameworks tend to use the only chainable method to filter out specific test suites to run. This could be an option too. However, passing globs or filenames as CLI arguments also makes sense. Which one do you prefer?

@SteveDesmond-ca
Copy link
Member Author

Looking at other xunit-style frameworks, here's the proposed spec:

  • user can pass a --filter (-f) option followed by a string to match against the fully-qualified name of the test (SuiteName.TestName)
  • if a filter is set, only run tests whose fully-qualified name contains the filter string
  • numbers sent to reporters should total only based on the filtered set of tests, not all tests
  • bonus 1 (separate PR): use regex instead of simple string matching
  • bonus 2 (separate PR): allow multiple filters to be passed (as "or"s/unions, vs "and"s/intersects)

@SteveDesmond-ca SteveDesmond-ca added feature Additional or changing functionality and removed help wanted Extra attention is needed labels Oct 20, 2021
@SteveDesmond-ca SteveDesmond-ca added the small Just a few hours of work label Dec 28, 2021
@SteveDesmond-ca
Copy link
Member Author

Implemented in v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Additional or changing functionality small Just a few hours of work
Projects
None yet
Development

No branches or pull requests

1 participant