[ { "id": "TC-001", "type": "positive", "input": "获取美国地区热门视频,maxResults=10", "expected": "返回10条热门视频JSON,包含viewCount/likeCount/commentCount", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 90, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 100 }, "total_score": 93, "note": "基础功能测试通过" }, { "id": "TC-002", "type": "positive", "input": "获取日本地区音乐分类热门视频", "expected": "返回日本music分类热门视频JSON,categoryId=10", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 95, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 100 }, "total_score": 94, "note": "多地区+分类测试通过" }, { "id": "TC-003", "type": "positive", "input": "使用videos端点抓取最热门视频", "expected": "调用videos?chart=mostPopular,返回statistics数据", "dimensions": { "API调用准确性": 100, "数据字段完整性": 95, "多地区多分类支持": 85, "错误处理健壮性": 85, "输出格式正确性": 90, "配额管理合理性": 100 }, "total_score": 93, "note": "API端点正确性测试通过" }, { "id": "TC-004", "type": "positive", "input": "获取韩国、巴西、英国三地热门视频", "expected": "支持多地区KR/BR/GB,返回对应地区数据", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 100, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 95 }, "total_score": 94, "note": "多地区支持完整" }, { "id": "TC-005", "type": "positive", "input": "请求时包含全部输出字段", "expected": "返回17个字段:videoId/title/channelTitle/channelId/subscriberCount/viewCount/likeCount/commentCount/publishedAt/description/url/thumbnail/categoryId/categoryName/tags/duration/crawlTime", "dimensions": { "API调用准确性": 90, "数据字段完整性": 100, "多地区多分类支持": 85, "错误处理健壮性": 85, "输出格式正确性": 90, "配额管理合理性": 90 }, "total_score": 91, "note": "数据字段完整性最佳" }, { "id": "TC-006", "type": "positive", "input": "当API配额耗尽时(403错误)", "expected": "返回错误信息并尝试yt-dlp降级", "dimensions": { "API调用准确性": 85, "数据字段完整性": 80, "多地区多分类支持": 80, "错误处理健壮性": 100, "输出格式正确性": 85, "配额管理合理性": 90 }, "total_score": 86, "note": "错误处理健壮" }, { "id": "TC-007", "type": "positive", "input": "批量获取多个地区视频", "expected": "使用videos端点(1 unit)而非search端点(100 unit)", "dimensions": { "API调用准确性": 95, "数据字段完整性": 85, "多地区多分类支持": 90, "错误处理健壮性": 85, "输出格式正确性": 90, "配额管理合理性": 100 }, "total_score": 91, "note": "配额成本优化" }, { "id": "TC-008", "type": "positive", "input": "获取视频包含tags和duration", "expected": "contentDetails包含duration,snippet包含tags", "dimensions": { "API调用准确性": 90, "数据字段完整性": 95, "多地区多分类支持": 85, "错误处理健壮性": 85, "输出格式正确性": 90, "配额管理合理性": 90 }, "total_score": 89, "note": "扩展字段完整" }, { "id": "TC-009", "type": "positive", "input": "请求超时500错误", "expected": "指数退避重试,max_retries=3", "dimensions": { "API调用准确性": 85, "数据字段完整性": 80, "多地区多分类支持": 80, "错误处理健壮性": 95, "输出格式正确性": 85, "配额管理合理性": 85 }, "total_score": 85, "note": "重试机制完善" }, { "id": "TC-010", "type": "positive", "input": "输出JSON格式正确且包含regionCode", "expected": "JSON可解析,包含regionCode字段,时间ISO8601", "dimensions": { "API调用准确性": 90, "数据字段完整性": 90, "多地区多分类支持": 90, "错误处理健壮性": 85, "输出格式正确性": 100, "配额管理合理性": 90 }, "total_score": 91, "note": "输出格式规范" }, { "id": "TC-011", "type": "positive", "input": "使用德国地区代码(DE)获取游戏分类", "expected": "regionCode=DE, videoCategoryId=20", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 95, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 95 }, "total_score": 94, "note": "DE地区+Gaming分类" }, { "id": "TC-012", "type": "positive", "input": "获取法国娱乐分类(24)热门视频", "expected": "regionCode=FR, videoCategoryId=24", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 95, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 95 }, "total_score": 94, "note": "FR+Entertainment" }, { "id": "TC-013", "type": "positive", "input": "maxResults设置为50", "expected": "返回最多50条视频", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 85, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 95 }, "total_score": 92, "note": "最大结果数测试" }, { "id": "TC-014", "type": "positive", "input": "视频不存在返回404", "expected": "跳过不存在视频,记录日志", "dimensions": { "API调用准确性": 85, "数据字段完整性": 80, "多地区多分类支持": 80, "错误处理健壮性": 95, "输出格式正确性": 85, "配额管理合理性": 85 }, "total_score": 85, "note": "404处理正确" }, { "id": "TC-015", "type": "positive", "input": "使用印度地区(IN)获取教育分类(27)", "expected": "regionCode=IN, videoCategoryId=27", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 95, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 95 }, "total_score": 94, "note": "IN+Education" }, { "id": "TC-016", "type": "positive", "input": "返回数据包含channelId和subscriberCount", "expected": "调用channels.list二次获取订阅数", "dimensions": { "API调用准确性": 90, "数据字段完整性": 95, "多地区多分类支持": 85, "错误处理健壮性": 85, "输出格式正确性": 90, "配额管理合理性": 85 }, "total_score": 89, "note": "频道详情扩展" }, { "id": "TC-017", "type": "positive", "input": "使用巴西地区(BR)获取体育分类(17)", "expected": "regionCode=BR, videoCategoryId=17", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 95, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 95 }, "total_score": 94, "note": "BR+Sports" }, { "id": "TC-018", "type": "positive", "input": "两次请求间隔1000ms", "expected": "满足rate_limit.min_interval_ms=1000", "dimensions": { "API调用准确性": 90, "数据字段完整性": 85, "多地区多分类支持": 85, "错误处理健壮性": 90, "输出格式正确性": 90, "配额管理合理性": 95 }, "total_score": 89, "note": "速率控制正确" }, { "id": "TC-019", "type": "positive", "input": "输出URL格式正确", "expected": "url=https://youtube.com/watch?v={videoId}", "dimensions": { "API调用准确性": 90, "数据字段完整性": 90, "多地区多分类支持": 85, "错误处理健壮性": 85, "输出格式正确性": 100, "配额管理合理性": 90 }, "total_score": 90, "note": "URL格式正确" }, { "id": "TC-020", "type": "positive", "input": "获取10个地区热门视频", "expected": "批量请求,使用videos端点,合并请求", "dimensions": { "API调用准确性": 95, "数据字段完整性": 90, "多地区多分类支持": 100, "错误处理健壮性": 90, "输出格式正确性": 95, "配额管理合理性": 100 }, "total_score": 95, "note": "多地区批量最优" }, { "id": "TC-021", "type": "negative", "input": "使用search.list端点获取热门视频", "expected": "配额成本100 unit/次,过高", "dimensions": { "API调用准确性": 60, "数据字段完整性": 70, "多地区多分类支持": 70, "错误处理健壮性": 60, "输出格式正确性": 70, "配额管理合理性": 20 }, "total_score": 58, "note": "使用高成本端点" }, { "id": "TC-022", "type": "negative", "input": "缺少chart参数", "expected": "API返回400错误", "dimensions": { "API调用准确性": 20, "数据字段完整性": 0, "多地区多分类支持": 30, "错误处理健壮性": 40, "输出格式正确性": 30, "配额管理合理性": 50 }, "total_score": 28, "note": "缺少必需参数" }, { "id": "TC-023", "type": "negative", "input": "缺少part参数", "expected": "API返回400错误", "dimensions": { "API调用准确性": 20, "数据字段完整性": 0, "多地区多分类支持": 30, "错误处理健壮性": 40, "输出格式正确性": 30, "配额管理合理性": 50 }, "total_score": 28, "note": "缺少必需参数" }, { "id": "TC-024", "type": "negative", "input": "返回数据缺少viewCount", "expected": "statistics核心字段缺失", "dimensions": { "API调用准确性": 70, "数据字段完整性": 30, "多地区多分类支持": 60, "错误处理健壮性": 60, "输出格式正确性": 60, "配额管理合理性": 70 }, "total_score": 52, "note": "核心字段缺失" }, { "id": "TC-025", "type": "negative", "input": "不处理403配额耗尽错误", "expected": "请求失败,无重试无降级", "dimensions": { "API调用准确性": 70, "数据字段完整性": 60, "多地区多分类支持": 60, "错误处理健壮性": 20, "输出格式正确性": 50, "配额管理合理性": 60 }, "total_score": 53, "note": "无错误处理" }, { "id": "TC-026", "type": "negative", "input": "输出格式为字符串非JSON", "expected": "JSON.parse失败", "dimensions": { "API调用准确性": 70, "数据字段完整性": 80, "多地区多分类支持": 70, "错误处理健壮性": 60, "输出格式正确性": 10, "配额管理合理性": 70 }, "total_score": 60, "note": "格式错误" }, { "id": "TC-027", "type": "negative", "input": "使用无效地区代码ZZ", "expected": "API返回错误或空结果", "dimensions": { "API调用准确性": 50, "数据字段完整性": 30, "多地区多分类支持": 30, "错误处理健壮性": 60, "输出格式正确性": 50, "配额管理合理性": 60 }, "total_score": 47, "note": "无效地区代码" }, { "id": "TC-028", "type": "negative", "input": "不支持任何地区过滤", "expected": "只能获取默认地区数据", "dimensions": { "API调用准确性": 60, "数据字段完整性": 70, "多地区多分类支持": 20, "错误处理健壮性": 50, "输出格式正确性": 60, "配额管理合理性": 60 }, "total_score": 53, "note": "缺少多地区支持" }, { "id": "TC-029", "type": "negative", "input": "不支持视频分类过滤", "expected": "无法按category筛选", "dimensions": { "API调用准确性": 60, "数据字段完整性": 70, "多地区多分类支持": 20, "错误处理健壮性": 50, "输出格式正确性": 60, "配额管理合理性": 60 }, "total_score": 53, "note": "缺少分类支持" }, { "id": "TC-030", "type": "negative", "input": "批量请求不控制频率", "expected": "触发429速率限制", "dimensions": { "API调用准确性": 70, "数据字段完整性": 70, "多地区多分类支持": 70, "错误处理健壮性": 30, "output_format_rigor": 60, "quota_management": 40 }, "total_score": 57, "note": "无速率控制" }, { "id": "TC-031", "type": "negative", "input": "返回数据缺少regionCode", "expected": "无法区分数据来源地区", "dimensions": { "API调用准确性": 70, "数据字段完整性": 50, "多地区多分类支持": 50, "错误处理健壮性": 50, "输出格式正确性": 40, "配额管理合理��": 60 }, "total_score": 53, "note": "缺少元数据" }, { "id": "TC-032", "type": "negative", "input": "使用过期的API Key", "expected": "401/403错误,无降级", "dimensions": { "API调用准确性": 40, "数据字段完整性": 30, "多地区多分类支持": 40, "错误处理健壮性": 30, "输出格式正确性": 40, "配额管理合理性": 50 }, "total_score": 38, "note": "认证失败" }, { "id": "TC-033", "type": "negative", "input": "返回字段没有likeCount和commentCount", "expected": "statistics核心字段缺失", "dimensions": { "API调用准确性": 70, "数据字段完整性": 30, "多地区多分类支持": 60, "错误处理健壮性": 60, "输出格式正确性": 60, "配额管理合理性": 70 }, "total_score": 52, "note": "统计数据缺失" }, { "id": "TC-034", "type": "negative", "input": "输出时间为非ISO格式", "expected": "时间格式错误", "dimensions": { "API调用准确性": 70, "数据字段完整性": 70, "多地区多分类支持": 70, "错误处理健壮性": 60, "输出格式正确性": 30, "配额管理合理性": 60 }, "total_score": 58, "note": "时间格式错误" }, { "id": "TC-035", "type": "negative", "input": "使用不存在的视频分类ID999", "expected": "返回空结果", "dimensions": { "API调用准确性": 60, "数据字段完整性": 40, "多地区多分类支持": 40, "错误处理健壮性": 50, "output_format_rigor": 60, "配额管理合理性": 60 }, "total_score": 50, "note": "无效分类ID" }, { "id": "TC-036", "type": "negative", "input": "没有正确处理500错误", "expected": "直接失败无重试", "dimensions": { "API调用准确性": 70, "数据字段完整性": 60, "多地区多分类支持": 60, "错误处理健壮性": 20, "输出格式正确性": 50, "配额管理合理性": 60 }, "total_score": 53, "note": "500错误未处理" }, { "id": "TC-037", "type": "negative", "input": "每次请求都调用search端点", "expected": "配额快速耗尽", "dimensions": { "API调用准确性": 60, "数据字段完整性": 70, "多地区多分类支持": 60, "错误处理健壮性": 50, "输出格式正确性": 60, "配额管理合理性": 10 }, "total_score": 52, "note": "配额浪费严重" }, { "id": "TC-038", "type": "negative", "input": "URL格式错误", "expected": "url不是youtube.com格式", "dimensions": { "API调用准确性": 70, "数据字段完整性": 70, "多地区多分类支持": 60, "错误处理健壮性": 50, "输出格式正确性": 20, "配额管理合理性": 60 }, "total_score": 55, "note": "URL格式错误" }, { "id": "TC-039", "type": "negative", "input": "没有YT-DLP降级方案", "expected": "API失败时无法恢复", "dimensions": { "API调用准确性": 70, "数据字段完整性": 60, "多地区多分类支持": 60, "错误处理健壮性": 30, "输出格式正确性": 60, "配额管理合理性": 60 }, "total_score": 55, "note": "无降级方案" }, { "id": "TC-040", "type": "positive", "input": "完整功能测试:US+JP,videos端点,17字段,yt-dlp降级", "expected": "全部通过", "dimensions": { "API调用准确性": 100, "数据字段完整性": 100, "多地区多分类支持": 100, "错误处理健壮性": 100, "输出格式正确性": 100, "配额管理合理性": 100 }, "total_score": 100, "note": "完美实现" } ]