Support for tag filtering

未关闭
#233 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
scala
领域
cli, testing-qa

调研方向

从 testOnly CLI 入口开始,追踪现有内置标签 ignore 和 only 的解析与应用方式。根据示例定义支持的 AND、OR、NOT、分组和通配符行为,然后验证诸如 testOnly * -- -t foo 的命令是否会选择预期的带标签测试。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Scala
星标
87
派生
17
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

typelevel/weaver-test 的其他 Issue

查看 typelevel/weaver-test 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。