82 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

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.

# 开始测试指南
## ✅ 准备工作已完成
所有模块测试通过:
- ✓ Flask 导入成功
- ✓ AIService 导入成功
- ✓ FieldService 导入成功
- ✓ DocumentService 导入成功
- ✓ 字段服务可以正常查询
- ✓ 文档服务初始化成功
- ✓ 所有依赖已安装
## 🚀 开始测试
### 步骤 1检查环境变量配置
请确保已创建 `.env` 文件并配置了 `SILICONFLOW_API_KEY`AI解析需要
如果没有配置,可以:
1. 创建 `.env` 文件
2. 添加以下内容:
```env
SILICONFLOW_API_KEY=你的API密钥
```
### 步骤 2启动服务
**方式 1使用启动脚本**
```bash
python app.py
```
**方式 2直接运行**
服务将启动在http://localhost:7500
### 步骤 3测试服务
在**新的终端窗口**中运行:
```bash
python test_complete.py
```
或者使用快速测试脚本:
```bash
python test_api.py
```
---
## 📋 测试清单
### 基础测试(必须通过)
- [ ] 服务可以启动
- [ ] 可以访问首页 (http://localhost:7500/)
- [ ] 可以访问API文档 (http://localhost:7500/api-docs)
### 接口测试需要API密钥
- [ ] 解析接口可以调用
- [ ] 解析接口可以提取字段
- [ ] 文档生成接口可以调用可选需要MinIO配置
---
## 🔧 下一步
1. **启动服务**(在当前终端)
2. **运行测试**(在新终端)
3. **查看结果**
如果遇到问题,请查看错误信息并参考 `测试流程说明.md` 中的故障排查部分。