add-test-requirement

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Add Test Requirement

添加测试要求

Always use the skill
load-plain-reference
to retrieve the ***plain syntax rules — but only if you haven't done so yet.
请始终使用技能
load-plain-reference
来获取***plain语法规则——但仅在你尚未获取过的情况下使用。

Workflow

工作流程

  1. Identify the target
    .plain
    file.
    If ambiguous, ask the user.
  2. Read the file to understand existing test reqs and the overall spec structure.
  3. Confirm this is a conformance test concern — unit test guidance goes in
    ***implementation reqs***
    , not here.
  4. Draft the requirement following the rules below.
  5. Insert it into the
    ***test reqs***
    section.
  6. Read the file again to confirm correct placement and syntax.
  1. 确定目标.plain文件。如果存在歧义,请询问用户。
  2. 读取文件,了解现有的测试要求和整体规格结构。
  3. 确认这属于一致性测试范畴——单元测试指导应放在
    ***implementation reqs***
    中,而非此处。
  4. 按照以下规则起草测试要求
  5. 将其插入到
    ***test reqs***
    部分
  6. 再次读取文件,确认放置位置和语法正确。

What Belongs Here

此处应包含的内容

Test reqs specify how conformance tests should be written and run. Common contents:
  • Test framework: which framework to use (e.g., pytest, Unittest, xUnit)
  • Execution method: the command to run the tests
  • Testing constraints: what must or must not be done in tests (e.g., no skipping tests, mock requirements)
  • Test data: how test fixtures or mock data should be structured
  • Environment setup: any prerequisites for running conformance tests
测试要求用于指定一致性测试的编写和运行方式。常见内容包括:
  • 测试框架:使用的框架(如pytest、Unittest、xUnit)
  • 执行方法:运行测试的命令
  • 测试约束:测试中必须或禁止执行的操作(如不允许跳过测试、模拟要求)
  • 测试数据:测试夹具或模拟数据的结构方式
  • 环境设置:运行一致性测试的任何先决条件

What Does NOT Belong Here

此处不应包含的内容

  • Unit test guidance — that goes in
    ***implementation reqs***
  • Acceptance tests — those are nested under individual functional specs in
    ***functional specs***
  • Behavioral requirements — those go in
    ***functional specs***
  • Technology choices for the implementation — those go in
    ***implementation reqs***
  • 单元测试指导——应放在
    ***implementation reqs***
  • 验收测试——应嵌套在
    ***functional specs***
    下的各个功能规格中
  • 行为要求——应放在
    ***functional specs***
  • 实现技术选择——应放在
    ***implementation reqs***

Conformance Tests vs Other Tests

一致性测试与其他测试的对比

Test TypeWhere to SpecifyPurpose
Unit tests
***implementation reqs***
Test individual functionalities in isolation
Conformance tests
***test reqs***
Verify implementation conforms to the full spec
Acceptance tests
***acceptance tests***
under a functional spec
Verify a specific functional spec
测试类型指定位置目的
单元测试
***implementation reqs***
孤立测试单个功能
一致性测试
***test reqs***
验证实现是否符合完整规格
验收测试功能规格下的
***acceptance tests***
验证特定功能规格

Format

格式

Test reqs are bullet points in the
***test reqs***
section:
plain
***test reqs***
- :ConformanceTests: should be implemented using pytest framework.
- :ConformanceTests: will be run using "pytest" command.
- :ConformanceTests: must be implemented and executed - do not skip tests.
- :ConformanceTests: should mock all external HTTP calls.
Reference predefined concepts like
:ConformanceTests:
and any defined
:Concepts:
where they add clarity.
测试要求是
***test reqs***
部分中的项目符号:
plain
***test reqs***
- :ConformanceTests: should be implemented using pytest framework.
- :ConformanceTests: will be run using "pytest" command.
- :ConformanceTests: must be implemented and executed - do not skip tests.
- :ConformanceTests: should mock all external HTTP calls.
在能提升清晰度的情况下,引用预定义概念如
:ConformanceTests:
和任何已定义的
:Concepts:

Validation Checklist

验证检查清单

  • Describes conformance testing concerns, not unit tests or behavior
  • All referenced
    :Concepts:
    are defined (or are predefined like
    :ConformanceTests:
    )
  • Does not duplicate guidance already present in the file or its imports
  • Placed inside a
    ***test reqs***
    section
  • No behavioral requirements that should be in
    ***functional specs***
  • 描述的是一致性测试相关内容,而非单元测试或行为要求
  • 所有引用的
    :Concepts:
    均已定义(或为
    :ConformanceTests:
    这类预定义概念)
  • 未重复文件或其导入内容中已有的指导
  • 放置在
    ***test reqs***
    部分内
  • 不包含应放在
    ***functional specs***
    中的行为要求