测试时间: 2025年1月13日
测试目标: 验证AI生成题目接口(Coze API)中difficulty字段的正确性
测试接口: /api/ai/auto-generate
测试脚本: test_coze_difficulty.py
✅ 测试完全成功!所有difficulty字段都正确设置和存储
难度级别 | 请求状态 | 响应状态码 | 生成题目数 | Difficulty字段 |
---|---|---|---|---|
简单 | ✅ 成功 | 200 | 2 | ✅ 正确设置为"简单" |
中等 | ✅ 成功 | 200 | 2 | ✅ 正确设置为"中等" |
困难 | ✅ 成功 | 200 | 2 | ✅ 正确设置为"困难" |
{
"detailId": 1,
"goalId": 1,
"content": "下列哪个函数是一次函数?",
"difficulty": "简单",
"contentType": "选择题"
}
{
"detailId": 2,
"goalId": 1,
"content": "函数 f(x) = x² 的导数是?",
"difficulty": "中等",
"contentType": "选择题"
}
{
"detailId": 3,
"goalId": 1,
"content": "复合函数 f(g(x)) 的导数公式是?",
"difficulty": "困难",
"contentType": "选择题"
}
difficulty
→ request.setDifficulty(difficulty)
/api/ai/auto-generate
CozeWorkflowService.parseQuestion()
方法中的difficulty字段解析正常工作goal_of_detail
中的difficulty字段正确存储CozeWorkflowService.parseQuestion()
中添加difficulty字段解析AI生成题目接口的difficulty字段功能已完全正常工作!
测试执行者: SOLO Coding
测试状态: ✅ 通过
最后更新: 2025年1月13日