10 KiB
10 KiB
Backend API Test Report
更新时间:2026-04-18
说明
- 本轮基于单机 Docker Compose 环境验收。
- Apifox 项目当前约 186 条 endpoint,含重复文档项、内部接口和管理接口映射。
- 为避免长脚本挂死,本轮改成按模块分批验收。
- 详细结果以 JSON 明细为准:
汇总
auth + user:29 项,29通过,0失败content + comment + recommend:63 项,63通过,0失败admin:23 项,23通过,0失败,0未测
最新重测
- 运行态排查确认:
video-user、video-comment容器此前实际运行的是旧 JAR,和本地源码不一致- 重新构建并覆盖容器内
/app/app.jar后,video-user、video-content、video-comment已与本地源码对齐
- 公开接口放行修复已生效:
GET /user/profile/public/{userId}现为200GET /user/profile/search现为200GET /user/follow/following/{userId}现为200GET /user/follow/followers/{userId}现为200GET /content/category/tree现为200GET /content/tag/list现为200GET /content/tag/page现为200
POST /content/video已打通,最新实测返回200,成功创建视频id=17- 评论链有进展:
GET /comment/public/list?videoId=17...返回200- 评论已成功落库到
videoId=17 POST /comment已恢复为正常快速返回,最新实测200,耗时约1207msPOST /comment/reply已返回200POST /comment/like/{id}已返回200GET /comment/reply/public/list/{commentId}已返回200
- 评论交互短测已补齐:
POST /comment:200,约279msPOST /comment/like/{id}:200,约294msDELETE /comment/like/{id}:200,约291msPOST /comment/reply:200,约281msGET /comment/reply/public/list/{commentId}:200,约264msGET /comment/reply/public/hot/{commentId}:200,约258msPOST /comment/reply/like/{id}:200,约262msDELETE /comment/reply/like/{id}:200,约263msDELETE /comment/reply/{id}:200,约284msDELETE /comment/{id}:200,约263ms
- 评论详情/置顶链复测:
GET /comment/public/detail/{id}:200,约718msPOST /comment/top/{id}?videoId=17:200,约426msDELETE /comment/top/{id}?videoId=17:200,约333mstop/untop需要“视频作者身份 + 正确的 videoId 参数”;旧失败结论来自测试前提不成立- 服务端已补充校验:评论必须属于传入的
videoId
- 视频主链短测已补齐:
GET /content/video/public/17:200,约281msGET /content/video/17:200,约312msPUT /content/video:200,约370msGET /content/tag/video/17:200,约248msPOST /content/video/like/17:200,约325msDELETE /content/video/like/17:200,约303msPOST /content/video/coin/17?amount=1:200,约262msPOST /content/video/share/17?platform=wechat:200,约275msPOST /content/video/play:200,约295msPOST /content/video/favorite:200,约345msDELETE /content/video/favorite/17:200,约270msGET /content/video/user/30:作者登录视角已恢复可见审核中视频POST /content/video/favorite的慢失败根因是收藏数同步回写video-user时遇到锁等待,现已改为afterCommit + async best-effort
- 内容链残余现象:
- 视频详情/视频列表里的
userNickname、userAvatar为空问题已修复 - 根因是
video-content前台详情/列表里对 Feign 返回码使用了Integer == Integer比较,远程200没命中成功分支
- 视频详情/视频列表里的
- 弹幕和统计链已打通:
POST /content/danmaku:200,约411msGET /content/danmaku/all/17:200,约270msGET /content/danmaku/time?videoId=17&startTime=0&endTime=30:200,约263msGET /content/stat/daily/17?...:200,约254msGET /content/stat/play/trend/17?...:200,约245msGET /content/stat/interaction/17:200,约251ms- RocketMQ 路由当前仍异常,但
video-content已补全主表降级更新;弹幕发送后danmakuCount已能从0正常变为1
- 后台视频审核链已打通:
POST /admin/platform/content/video/review/17?status=1&reason=ok:200GET /admin/platform/content/video/17:200- 根因一:
video-admin -> video-content之前没有透传adminId - 根因二:
content_video_review.reviewer_id外键错误指向了video_auth.auth_user - 现已改为透传
X-Admin-Id,并把审核记录外键改到video_admin.admin_user
- 最后一轮收尾项:
GET /auth/username/30:200,已作为公开接口放行GET /admin/platform/comment/10:200PUT /admin/platform/content/video/disable/17:200- 为避免环境被留在下架状态,
videoId=17已重新审核恢复为发布状态
- 原未测接口空白已补齐:
POST /admin/auth/logout:200GET /auth/admin/login/stats:200PUT /auth/admin/reset-password/{userId}:200PUT /auth/admin/lock/{userId}/{locked}:200POST /content/video/upload:200DELETE /content/video/{id}:200POST /content/video/review/{videoId}:内部审核接口已打通,普通用户访问已403GET /content/category/admin/list:200POST /content/category/admin:200PUT /content/category/admin:200DELETE /content/category/admin/{categoryId}:200DELETE /content/tag/{id}:200POST /recommend/behavior:200POST /recommend/interest/update:200GET /recommend/similar/{videoId}:200GET /recommend/tag/{tagId}:200recommend/interest/update的 500 根因是 MyBatisMap<Long, Float>foreach 写法错误,现已修复
- 登录链复测:
POST /auth/login最新实测200,耗时约994ms
已通过
核心认证与用户链
POST /auth/registerPOST /auth/loginPOST /auth/login:不带验证码会被拦截POST /auth/refreshGET /auth/username/{userId}GET /auth/currentGET /user/profile/currentPUT /user/profileGET /user/settingPUT /user/settingPOST /user/follow/{followId}GET /user/follow/check/{followId}GET /user/notification/listGET /user/notification/unread/countPUT /user/notification/readPOST /user/messageGET /user/message/listGET /user/message/detail/{targetId}GET /user/message/unread/countPUT /user/message/read/{senderId}POST /auth/logoutDELETE /user/follow/{followId}GET /auth/admin/login/statsPUT /auth/admin/reset-password/{userId}PUT /auth/admin/lock/{userId}/{locked}
内容/评论/推荐中已确认正常的部分
GET /content/category/listGET /content/category/treePOST /content/categoryPUT /content/categoryDELETE /content/category/{id}POST /content/tagGET /content/tag/listGET /content/tag/pagePOST /content/favoriteGET /content/favorite/listPUT /content/favoritePOST /content/videoPOST /content/video/uploadGET /content/video/public/{id}GET /content/video/public/listGET /content/video/{id}GET /content/video/listGET /content/video/user/{userId}PUT /content/videoDELETE /content/video/{id}POST /content/video/review/{videoId}GET /content/tag/video/{videoId}POST /content/video/like/{videoId}DELETE /content/video/like/{videoId}POST /content/video/coin/{videoId}POST /content/video/share/{videoId}POST /content/video/playPOST /content/video/favoriteGET /content/favorite/{favoriteId}/videosDELETE /content/video/favorite/{videoId}DELETE /content/favorite/{id}GET /content/category/admin/listPOST /content/category/adminPUT /content/category/adminDELETE /content/category/admin/{categoryId}DELETE /content/tag/{id}POST /content/danmakuGET /content/danmaku/all/{videoId}GET /content/danmaku/timeGET /content/stat/daily/{videoId}GET /content/stat/play/trend/{videoId}GET /content/stat/interaction/{videoId}POST /recommend/behaviorPOST /recommend/interest/updateGET /recommend/similar/{videoId}GET /recommend/tag/{tagId}GET /comment/public/listGET /comment/public/detail/{id}GET /comment/public/stat/{videoId}POST /commentDELETE /comment/{id}POST /comment/replyPOST /comment/like/{id}DELETE /comment/like/{id}POST /comment/top/{id}DELETE /comment/top/{id}GET /comment/reply/public/list/{commentId}GET /comment/reply/public/hot/{commentId}POST /comment/reply/like/{id}DELETE /comment/reply/like/{id}DELETE /comment/reply/{id}
后台链
POST /admin/auth/loginPOST /admin/auth/login:不带验证码会被拦截POST /admin/auth/logoutGET /admin/auth/infoGET /admin/platform/user/listGET /admin/platform/user/{userId}PUT /admin/platform/user/{userId}/status/{status}PUT /admin/platform/user/{userId}/reset-passwordPOST /auth/login:禁用用户后登录被拦截POST /auth/login:后台重置密码后可重新登录GET /admin/platform/content/category/listPOST /admin/platform/content/categoryPUT /admin/platform/content/categoryDELETE /admin/platform/content/category/{categoryId}GET /admin/platform/comment/listGET /admin/platform/comment/statsGET /admin/platform/comment/{commentId}GET /admin/platform/content/video/listGET /admin/platform/content/video/{videoId}POST /admin/platform/content/video/review/{videoId}PUT /admin/platform/content/video/disable/{videoId}GET /admin/dashboard/stats