test.json 4.57 KB
[
  {
    "id": "TC-041",
    "type": "boundary",
    "input": { "method": "API", "maxResults": 0 },
    "expected": { "error": "400", "min": 1 },
    "dimensions": { "功能完整性": 50, "API规范使用": 50, "代码质量": 60, "数据准确性": 50, "反爬虫处理": 60, "降级方案支持": 40, "配置灵活性": 50, "性能优化": 50 },
    "total_score": 51,
    "note": "边界:maxResults=0(超出有效范围 1-50)"
  },
  {
    "id": "TC-042",
    "type": "boundary",
    "input": { "method": "API", "maxResults": 51 },
    "expected": { "error": "400", "max": 50 },
    "dimensions": { "功能完整性": 50, "API规范使用": 50, "代码质量": 60, "数据准确性": 50, "反爬虫处理": 60, "降级方案支持": 40, "配置灵活性": 50, "性能优化": 50 },
    "total_score": 51,
    "note": "边界:maxResults=51(刚好超出最大值)"
  },
  {
    "id": "TC-043",
    "type": "boundary",
    "input": { "method": "API", "api_key": "" },
    "expected": { "error": "400", "reason": "key_required" },
    "dimensions": { "功能完整性": 50, "API规范使用": 50, "代码质量": 60, "数据准确性": 50, "反爬虫处理": 50, "降级方案支持": 60, "配置灵活性": 50, "性能优化": 50 },
    "total_score": 52,
    "note": "边界:空 API Key 处理"
  },
  {
    "id": "TC-044",
    "type": "boundary",
    "input": { "method": "API", "api_key": "invalid_key_123" },
    "expected": { "error": "403", "reason": "invalid_key" },
    "dimensions": { "功能完整性": 50, "API规范使用": 50, "代码质量": 70, "数据准确性": 50, "反爬虫处理": 70, "降级方案支持": 60, "配置灵活性": 50, "性能优化": 50 },
    "total_score": 57,
    "note": "边界:无效 API Key 处理"
  },
  {
    "id": "TC-045",
    "type": "boundary",
    "input": { "method": "API", "regionCode": "XX" },
    "expected": { "error": "400", "reason": "invalid_region" },
    "dimensions": { "功能完整性": 50, "API规范使用": 50, "代码质量": 70, "数据准确性": 50, "反爬虫处理": 60, "降级方案支持": 60, "配置灵活性": 50, "性能优化": 50 },
    "total_score": 56,
    "note": "边界:无效 regionCode(非 ISO 3166-1 alpha-2)"
  },
  {
    "id": "TC-046",
    "type": "boundary",
    "input": { "method": "API", "videoCategoryId": 9999 },
    "expected": { "error": "400", "reason": "invalid_category" },
    "dimensions": { "功能完整性": 50, "API规范使用": 50, "代码质量": 70, "数据准确性": 50, "反爬虫处理": 60, "降级方案支持": 60, "配置灵活性": 50, "性能优化": 50 },
    "total_score": 56,
    "note": "边界:无效 category ID"
  },
  {
    "id": "TC-047",
    "type": "boundary",
    "input": { "method": "yt-dlp", "url": "https://www.youtube.com/feed/trending", "network_timeout": true },
    "expected": { "error": "timeout", "retry": 3, "fallback": "api" },
    "dimensions": { "功能完整性": 70, "API规范使用": 0, "代码质量": 85, "数据准确性": 70, "反爬虫处理": 85, "降级方案支持": 90, "配置灵活性": 60, "性能优化": 70 },
    "total_score": 74,
    "note": "边界:yt-dlp 网络超时后的降级处理"
  },
  {
    "id": "TC-048",
    "type": "boundary",
    "input": { "method": "API", "quota_exceeded": true },
    "expected": { "error": "403", "reason": "quotaExceeded", "fallback": "ytdlp" },
    "dimensions": { "功能完整性": 70, "API规范使用": 70, "代码质量": 85, "数据准确性": 70, "反爬虫处理": 80, "降级方案支持": 90, "配置灵活性": 60, "性能优化": 70 },
    "total_score": 76,
    "note": "边界:API 配额耗尽后的降级"
  },
  {
    "id": "TC-049",
    "type": "boundary",
    "input": { "method": "API", "empty_result": true, "region": "AQ" },
    "expected": { "videos": [], "note": "no_trending_in_antarctica" },
    "dimensions": { "功能完整性": 80, "API规范使用": 85, "代码质量": 85, "数据准确性": 80, "反爬虫处理": 80, "降级方案支持": 60, "配置灵活性": 80, "性能优化": 70 },
    "total_score": 79,
    "note": "边界:API 返回空结果(如南极洲无 trending)"
  },
  {
    "id": "TC-050",
    "type": "boundary",
    "input": { "method": "API", "partial_fields": true, "snippet_missing": true },
    "expected": { "videos": [{ "videoId": "string", "title": null, "viewCount": 12345 }] },
    "dimensions": { "功能完整性": 70, "API规范使用": 70, "代码质量": 80, "数据准确性": 70, "反爬虫处理": 70, "降级方案支持": 50, "配置灵活性": 60, "性能优化": 60 },
    "total_score": 68,
    "note": "边界:API 返回部分字段缺失的处理"
  }
]