Files
ai_wht_B/整体后端接口测试报表_20251229.md
“shengyudong” 5a384b694e 2026-1-6
2026-01-06 14:18:39 +08:00

156 lines
4.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 整体后端接口性能测试报表
**生成时间**: 2025-12-29 18:14:22
---
## 📈 总体测试统计
| 指标 | 数值 |
|------|------|
| 测试总数 | 99 个 |
| 成功数量 | 91 个 ✓ |
| 失败数量 | 8 个 ✗ |
| **成功率** | **91.92%** |
| 平均耗时 | 195.87ms |
| 最大耗时 | 1228.11ms |
| 最小耗时 | 2.22ms |
**最慢接口**:
- `/api/images/list (每页10条)` (图片接口) - 1228.11ms
**最快接口**:
- `/api/authors/999999 (更新作者)` (作者接口) - 2.22ms
---
## 📊 各模块性能分析
| 模块 | 测试数 | 成功 | 失败 | 成功率 | 平均耗时 | 最大耗时 | 最小耗时 | 状态 |
|------|--------|------|------|--------|----------|----------|----------|------|
| 基础接口 | 7 | 7 | 0 | 100.0% | 42.53ms | 104.68ms | 2.28ms | 🟢 优秀 |
| 认证接口 | 11 | 11 | 0 | 100.0% | 107.83ms | 207.01ms | 2.63ms | 🟢 优秀 |
| 图片接口 | 17 | 17 | 0 | 100.0% | 308.47ms | 1228.11ms | 79.55ms | 🟢 优秀 |
| 日志接口 | 7 | 7 | 0 | 100.0% | 48.27ms | 110.71ms | 3.00ms | 🟢 优秀 |
| 文章接口 | 9 | 9 | 0 | 100.0% | 317.00ms | 554.90ms | 93.61ms | 🟢 优秀 |
| 员工接口 | 8 | 8 | 0 | 100.0% | 196.50ms | 420.91ms | 105.04ms | 🟢 优秀 |
| 企业接口 | 17 | 15 | 2 | 88.2% | 256.37ms | 818.23ms | 77.67ms | 🟡 良好 |
| 工作台 | 11 | 9 | 2 | 81.8% | 178.72ms | 309.12ms | 79.04ms | 🟡 良好 |
| 作者接口 | 12 | 8 | 4 | 66.7% | 131.31ms | 307.84ms | 2.22ms | 🟠 一般 |
### ⚠️ 失败接口详情
**企业接口** (2个失败):
- `/api/enterprises/list (关键词搜索)`
- `/api/enterprises/change-password`
**工作台** (2个失败):
- `/api/dashboard/recent-publishes (10条记录)`
- `/api/dashboard/recent-publishes (20条记录)`
**作者接口** (4个失败):
- `/api/authors/list`
- `/api/authors (POST)`
- `/api/authors/999999 (更新作者)`
- `/api/authors/999999 (删除作者)`
---
## 🔧 HTTP方法分布
| 方法 | 总数 | 成功 | 失败 | 成功率 |
|------|------|------|------|--------|
| DELETE | 6 | 5 | 1 | 83.3% |
| GET | 67 | 63 | 4 | 94.0% |
| POST | 20 | 19 | 1 | 95.0% |
| PUT | 6 | 4 | 2 | 66.7% |
---
## ⚡ 性能分布分析
| 性能等级 | 数量 | 占比 |
|----------|------|------|
| 🚀 极快 (<100ms) | 27 | 27.3% |
| 正常 (100-500ms) | 65 | 65.7% |
| 较慢 (500-1000ms) | 5 | 5.1% |
| 🐌 很慢 (>1000ms) | 2 | 2.0% |
### 性能分布可视化
```
极快 (<100ms): █████████████ 27个
正常 (100-500ms): ████████████████████████████████ 65个
较慢 (500-1000ms):██ 5个
很慢 (>1000ms): █ 2个
```
---
## 📋 HTTP状态码分布
| 状态码 | 数量 | 占比 | 说明 |
|--------|------|------|------|
| 200 | 73 | 73.7% | ✅ 成功 |
| 400 | 3 | 3.0% | ⚠️ 客户端错误 |
| 401 | 3 | 3.0% | ⚠️ 客户端错误 |
| 403 | 3 | 3.0% | ⚠️ 客户端错误 |
| 404 | 9 | 9.1% | ⚠️ 客户端错误 |
| 409 | 1 | 1.0% | ⚠️ 客户端错误 |
| 500 | 7 | 7.1% | ❌ 服务器错误 |
---
## 📚 接口文档统计
**已记录接口总数**: 51 个
**需要认证**: 46 个 (90.2%)
### 按模块分类
| 模块 | 接口数 |
|------|--------|
| 图片接口 | 16 |
| 作者接口 | 8 |
| 文章接口 | 7 |
| 企业接口 | 5 |
| 员工接口 | 4 |
| 认证接口 | 3 |
| 工作台 | 3 |
| 日志接口 | 3 |
| 基础接口 | 2 |
### 按方法分类
| 方法 | 接口数 |
|------|--------|
| DELETE | 6 |
| GET | 27 |
| POST | 12 |
| PUT | 6 |
---
## 💡 优化建议
🔴 **作者接口** 模块成功率仅 66.7%,建议优先排查认证、参数和数据库连接问题
⚠️ 发现 7 个耗时超过500ms的接口建议添加缓存或优化查询
慢接口TOP 3:
- `/api/images/list (每页10条)` (图片接口) - 1228.11ms
- `/api/images/list (第1页)` (图片接口) - 1176.29ms
- `/api/enterprises/list (状态筛选)` (企业接口) - 818.23ms
---
## ⚙️ 测试配置
- **主服务地址**: `http://127.0.0.1:8216`
- **搜索服务地址**: `http://127.0.0.1:8321`
- **测试账号**: `13621242430`
- **启用模块** (9个): basic, auth, dashboard, enterprise, image, log, article, employee, author
- **禁用模块** (1个): search
---
*报表由整体后端接口性能测试工具自动生成*