typelevel / typelevel/weaver-test
Support for tag filtering
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 85
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Currently looks like that there is only support for built-in tags (ignore and only) but despite you can tag any test with tagged that has not use.
I was wondering if there is appetite to support filtering based on the test tags, that will allow to write something like this using a syntax similar to Github search where the (space) is the AND, the , is the OR and ! for NOT:
testOnly * -- -t foo // Run all the tests tagged with foo
testOnly * -- -t !foo // Run all the tests not tagged with foo
testOnly * -- -t foo,bar // Run all the tests tagged with foo or bar
testOnly * -- -t foo,!bar // Run all the tests tagged with foo or not tagged with bar
testOnly * -- -t (foo,bar) baz // Run all the tests tagged with foo or bar and the tests tagged with baz
Additionally, it would be useful to support wildcards for pattern matching:
testOnly * -- -t bug-* // Run all tests tagged with bug-123, bug-critical, etc.
testOnly * -- -t *:prod // Run all tests tagged with env:prod, db:prod, etc.
testOnly * -- -t test-? // Run all tests tagged with test-1, test-a, etc. (single character)
This would be really useful to my use case and I am happy to contribute if possible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the testOnly CLI entry point and trace how the existing built-in tags, ignore and only, are parsed and applied. Define the supported AND, OR, NOT, grouping, and wildcard behavior from the examples, then verify that commands such as testOnly * -- -t foo select the expected tagged tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100