train.json
17.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
[
{
"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": "完美实现"
}
]