Documentation needed about how to write a "where" statement for test cases resulting from TestCase attribute or TestFixture parameters

未关闭
#138 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp
领域
cli, documentation

调研方向

从 Test Selection Language 文档及其命令行入口 --where 开始。使用所示的 TestFixture 构造函数值和 TestBug345 示例,添加选择由 TestCase 和 TestFixture 参数生成的测试的示例。完成的标准是文档解释了适用于特定测试的过滤器语法,以及更广泛的 fixture 选择。

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

描述

Please, can you write a couple of more examples in the documentation about the Test Selection Language about how to select tests resulting from TestCase attribute or TestFixture various constructing values etc.
For example I have a test that I want to select Test.ClipboardTests("no").TestBug345. I see this full name by doing the following on the assembly:

using (ITestEngine engine = TestEngineActivator.CreateInstance(true))
{
     engine.WorkDirectory = Environment.CurrentDirectory;
     engine.InternalTraceLevel = InternalTraceLevel.Verbose;

     TestPackage package = MakeTestPackage(assemblyName);
     ITestRunner runner = engine.GetRunner(package);
     return runner.Explore(TestFilter.Empty);
} 

The ClipboardTests test fixture has these attributes:

[TestFixture("en-US")]
[TestFixture("no")]
public  class ClipboardTests{
.
.
.
}

I have been trying to single out that test when running the command line by using:
--where="test=~/.*Test.ClipboardTests(\"no\").TestBug345.*/"
However, that does not work.
Of course, if I do --where="test=~/.*Test.ClipboardTests.*/", then I get all the tests in that fixture.

主要语言
Dockerfile
星标
601
派生
159
平均合并
22 小时 18 分钟
30 天内合并 PR
6

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

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

从这里开始

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

nunit/docs 的其他 Issue

查看 nunit/docs 的全部 Issue

相似的 Issue

更多 CLI Issue

把新 issue 发到你的邮箱

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