Files
012-kaopeilian/deploy/scripts/test_statistics_apis.sh
111 998211c483 feat: 初始化考培练系统项目
- 从服务器拉取完整代码
- 按框架规范整理项目结构
- 配置 Drone CI 测试环境部署
- 包含后端(FastAPI)、前端(Vue3)、管理端

技术栈: Vue3 + TypeScript + FastAPI + MySQL
2026-01-24 19:33:28 +08:00

40 lines
1.1 KiB
Bash
Executable File
Raw 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.
#!/bin/bash
# 测试所有统计分析API
API_BASE="http://localhost:8000/api/v1/statistics"
PERIOD="month"
echo "=========================================="
echo "测试统计分析API"
echo "=========================================="
echo ""
echo "1⃣ 测试关键指标..."
curl -s "${API_BASE}/key-metrics?period=${PERIOD}" | python3 -m json.tool | head -20
echo ""
echo "2⃣ 测试成绩分布..."
curl -s "${API_BASE}/score-distribution?period=${PERIOD}" | python3 -m json.tool
echo ""
echo "3⃣ 测试难度分析..."
curl -s "${API_BASE}/difficulty-analysis?period=${PERIOD}" | python3 -m json.tool
echo ""
echo "4⃣ 测试知识点掌握度..."
curl -s "${API_BASE}/knowledge-mastery" | python3 -m json.tool | head -30
echo ""
echo "5⃣ 测试学习时长..."
curl -s "${API_BASE}/study-time?period=${PERIOD}" | python3 -m json.tool | head -30
echo ""
echo "6⃣ 测试详细数据..."
curl -s "${API_BASE}/detail?period=${PERIOD}" | python3 -m json.tool | head -40
echo ""
echo "=========================================="
echo "✅ 测试完成"
echo "=========================================="