Files
张翔 be5d5ede90 feat: 添加异常日志功能并优化UI样式
refactor: 重构后端查询逻辑和API响应处理

fix: 修复用户角色更新和文件上传问题

test: 添加前端性能测试脚本和E2E测试用例

chore: 更新依赖版本和配置文件

docs: 添加环境检查脚本和测试文档

style: 统一表格标签样式和路由命名

perf: 优化前端页面加载速度和响应时间
2026-03-24 13:32:20 +08:00

47 lines
1.4 KiB
Bash
Executable File
Raw Permalink 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.
#!/bin/bash
# Playwright E2E Headless 模式测试脚本
# 用于完整的端到端测试和UAT测试
set -e
echo "========================================"
echo "Playwright E2E Headless 测试脚本"
echo "========================================"
# 设置工作目录
cd /Users/zhangxiang/Codes/Novalon/novalon-manage-system/novalon-manage-web
# 检查前端开发服务器
echo "🔍 检查前端开发服务器..."
if ! lsof -ti:3001 > /dev/null; then
echo "❌ 前端开发服务器未运行,启动中..."
npm run dev > /tmp/frontend.log 2>&1 &
echo "✅ 前端开发服务器已启动(PID: $!"
sleep 10
fi
# 检查后端服务
echo "🔍 检查后端服务..."
if ! lsof -ti:8080 > /dev/null; then
echo "❌ 后端服务未运行,启动中..."
cd /Users/zhangxiang/Codes/Novalon/novalon-manage-system/novalon-manage-api
mvn spring-boot:run -pl manage-gateway > /tmp/gateway.log 2>&1 &
echo "✅ 后端服务已启动(PID: $!"
sleep 30
fi
# 回到前端目录
cd /Users/zhangxiang/Codes/Novalon/novalon-manage-system/novalon-manage-web
# 运行 E2E 测试(Headless 模式)
echo "🚀 运行 E2E 测试(Headless 模式)..."
PLAYWRIGHT_HEADLESS=true npx playwright test --project=chromium --reporter=list
# 生成测试报告
echo "📊 生成测试报告..."
npx playwright show-report playwright-report
echo "✅ E2E Headless 测试完成!"
echo "_report: playwright-report/index.html"