seed_data.json 6.46 KB
{
  "version": "1.0",
  "description": "Publisher 技能种子数据 - 测试用例和示例配置",
  "test_cases": [
    {
      "id": "tc_001",
      "test_case": "视频分片上传-抖音",
      "platform": "抖音",
      "operation": "upload",
      "input": {
        "file_name": "interactive_ep1.mp4",
        "file_size": 104857600,
        "chunk_size": 5242880,
        "file_hash": "abc123def456"
      },
      "expected_response": {
        "upload_id": "upload_xxx",
        "upload_url": "https://***.oss.aliyuncs.com/",
        "auth_token": "STS.***"
      },
      "validation": {
        "required_fields": ["upload_id", "upload_url"],
        "timeout_ms": 60000
      }
    },
    {
      "id": "tc_002",
      "test_case": "视频发布-抖音",
      "platform": "抖音",
      "operation": "publish",
      "input": {
        "video_id": "video_xxx",
        "title": "互动剧第一集:命运交叉点",
        "description": "在这关键时刻,你将做出怎样的选择?#互动剧 #剧情",
        "topics": ["互动剧", "剧情", "选择"],
        "location": "北京",
        "cover_image": "cover_xxx"
      },
      "expected_response": {
        "video_id": "video_new_xxx",
        "share_url": "https://v.douyin.com/xxx",
        "create_time": 1774542000
      },
      "validation": {
        "required_fields": ["video_id", "share_url"],
        "max_title_length": 55
      }
    },
    {
      "id": "tc_003",
      "test_case": "分片上传-快手",
      "platform": "快手",
      "operation": "chunked_upload",
      "input": {
        "file_name": "drama_s1.mp4",
        "file_size": 209715200,
        "part_size": 10485760,
        "parts": 20
      },
      "expected_response": {
        "upload_id": "ks_upload_xxx",
        "complete_url": "https://uploader.kuaishou.com/complete"
      },
      "validation": {
        "required_fields": ["upload_id"]
      }
    },
    {
      "id": "tc_004",
      "test_case": "草稿保存-快手",
      "platform": "快手",
      "operation": "save_draft",
      "input": {
        "title": "互动剧试拍",
        "video_path": "/tmp/draft.mp4",
        "description": "测试内容"
      },
      "expected_response": {
        "draft_id": "draft_xxx",
        "status": "saved"
      },
      "validation": {
        "required_fields": ["draft_id"]
      }
    },
    {
      "id": "tc_005",
      "test_case": "视频号发布",
      "platform": "微信视频号",
      "operation": "publish",
      "input": {
        "title": "互动剧-第一集",
        "file_name": "video.mp4",
        "description": "互动剧内容",
        "author": "ABC工作室",
        "category": "剧情"
      },
      "expected_response": {
        "media_id": "media_xxx",
        "msg_id": "msg_xxx"
      },
      "validation": {
        "required_fields": ["media_id"]
      }
    },
    {
      "id": "tc_006",
      "test_case": "B站上传预检",
      "platform": "B站",
      "operation": "pre_upload",
      "input": {
        "file_name": "b_ep1.mp4",
        "file_size": 524288000,
        "file_hash": "md5:xxx"
      },
      "expected_response": {
        "upload_url": "https://upload.bilibili.com/xxx",
        "auth": "bili_token",
        "endpoint": "upos://xxx"
      },
      "validation": {
        "required_fields": ["upload_url", "endpoint"]
      }
    },
    {
      "id": "tc_007",
      "test_case": "B站发布",
      "platform": "B站",
      "operation": "publish",
      "input": {
        "cover": "cover_xxx",
        "title": "【互动】命运的抉择 第一集",
        "desc": "互动剧试播,点击选择你的命运!",
        "tag": "互动剧",
        "tid": 201,
        "copyright": 1,
        "videos": [
          {
            "filename": "bili_xxx",
            "title": "P1 命运交叉点"
          }
        ]
      },
      "expected_response": {
        "bvid": "BVxxx",
        "aid": 123456789,
        "publish_time": 1774542000
      },
      "validation": {
        "required_fields": ["bvid", "aid"]
      }
    },
    {
      "id": "tc_008",
      "test_case": "小红书视频上传",
      "platform": "小红书",
      "operation": "upload",
      "input": {
        "file": "xhs_video.mp4",
        "size": 104857600,
        "type": "video"
      },
      "expected_response": {
        "file_id": "xhs_file_xxx",
        "upload_url": "https://upload.xiaohongshu.com/xxx"
      },
      "validation": {
        "required_fields": ["file_id"]
      }
    },
    {
      "id": "tc_009",
      "test_case": "互动剧互动点标记",
      "platform": "抖音",
      "operation": "interaction_tag",
      "input": {
        "video_id": "video_xxx",
        "interactions": [
          {
            "time": 120,
            "type": "choice",
            "timestamp": 120000,
            "options": [
              {"id": "opt_a", "text": "继续前行", "next_scene": "scene_002"},
              {"id": "opt_b", "text": "转身离开", "next_scene": "scene_003"}
            ]
          },
          {
            "time": 360,
            "type": "choice",
            "timestamp": 360000,
            "options": [
              {"id": "opt_c", "text": "拯救同伴", "next_scene": "scene_005"},
              {"id": "opt_d", "text": "独自逃跑", "next_scene": "scene_006"}
            ]
          }
        ]
      },
      "expected_response": {
        "interaction_id": "interaction_xxx",
        "total_points": 2
      },
      "validation": {
        "required_fields": ["interaction_id"]
      }
    },
    {
      "id": "tc_010",
      "test_case": "发布状态查询",
      "platform": "通用",
      "operation": "status_check",
      "input": {
        "platform": "抖音",
        "video_id": "video_xxx"
      },
      "expected_response": {
        "status": "published",
        "publish_time": 1774542000,
        "view_count": 0,
        "like_count": 0
      },
      "validation": {
        "status_values": ["uploading", "processing", "published", "failed"]
      }
    }
  ],
  "sample_config": {
    "platform_credentials": {
      "douyin": {
        "client_key": "xxx",
        "client_secret": "xxx",
        "scope": "video_create"
      },
      "kuaishou": {
        "app_id": "xxx",
        "app_secret": "xxx"
      },
      "weixin": {
        "app_id": "xxx",
        "app_secret": "xxx"
      }
    },
    "upload_settings": {
      "default_chunk_size": 5242880,
      "max_concurrent_parts": 4,
      "retry_on_failure": true,
      "progress_callback_interval_ms": 1000
    }
  }
}