Files
test_item_gen/config/default_prompt.yaml
2026-02-04 14:38:52 +08:00

114 lines
3.3 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# @line_count 50
# 测试生成Prompt模板配置
# 测试项生成Prompt
test_item_prompt: |
你是一位资深的软件测试专家,擅长根据软件功能描述生成全面的测试项。
请根据以下功能描述,生成详细的测试项。每个测试项应该包含:
1. 测试项名称:清晰描述测试内容
2. 测试类型:功能测试/性能测试/安全测试/兼容性测试/易用性测试
3. 优先级:高/中/低
4. 测试目标:简要说明测试目的
功能描述:
{function_description}
所属模块:{module_name}
请生成3-5个测试项确保覆盖正常功能、异常情况、边界条件等。以JSON格式输出格式如下
{{
"test_items": [
{{
"name": "测试项名称",
"test_type": "功能测试",
"priority": "高",
"test_objective": "测试目标描述"
}}
]
}}
# 测试用例生成Prompt
test_case_prompt: |
你是一位资深的软件测试专家,擅长编写详细的测试用例。
请根据以下测试项信息,生成详细的测试用例。每个测试用例必须包含:
1. 测试用例名称
2. 前置条件
3. 详细测试步骤(步骤编号,每步清晰明确)
4. 预期结果
5. 优先级(高/中/低)
6. 测试类型
测试项信息:
测试项名称:{test_item_name}
测试类型:{test_type}
所属模块:{module_name}
功能描述:{function_description}
请生成1-3个详细的测试用例确保步骤清晰、可执行。以JSON格式输出格式如下
{{
"test_cases": [
{{
"name": "测试用例名称",
"preconditions": "前置条件描述",
"test_steps": [
"步骤1具体操作",
"步骤2具体操作",
"步骤3验证结果"
],
"expected_result": "预期结果描述",
"priority": "高",
"test_type": "功能测试"
}}
]
}}
# 批量生成Prompt一次性生成测试项和测试用例
batch_generation_prompt: |
你是一位资深的软件测试专家,擅长根据软件功能描述生成全面的测试项和测试用例。
请根据以下功能描述,生成完整的测试项和对应的测试用例。
功能描述:
{function_description}
所属模块:{module_name}
要求:
1. 生成3-5个测试项每个测试项包含
- 测试项名称
- 测试类型(功能测试/性能测试/安全测试/兼容性测试/易用性测试)
- 优先级(高/中/低)
- 测试目标
2. 为每个测试项生成1-3个详细测试用例每个测试用例包含
- 测试用例名称
- 前置条件
- 详细测试步骤(编号清晰)
- 预期结果
- 优先级
- 测试类型
以JSON格式输出格式如下
{{
"test_items": [
{{
"name": "测试项名称",
"test_type": "功能测试",
"priority": "高",
"test_objective": "测试目标",
"test_cases": [
{{
"name": "测试用例名称",
"preconditions": "前置条件",
"test_steps": ["步骤1", "步骤2", "步骤3"],
"expected_result": "预期结果",
"priority": "高",
"test_type": "功能测试"
}}
]
}}
]
}}