优化分批执行点击菜单
This commit is contained in:
parent
3921448aa1
commit
aa3f497434
@ -92,6 +92,8 @@ Playwright配置文件统一管理所有浏览器相关的配置:
|
||||
1. **安装依赖**
|
||||
```bash
|
||||
npm install
|
||||
|
||||
npx playwright install
|
||||
```
|
||||
|
||||
2. **配置环境变量**
|
||||
@ -106,6 +108,7 @@ Playwright配置文件统一管理所有浏览器相关的配置:
|
||||
4. **查看报告**
|
||||
```bash
|
||||
npm run show-report
|
||||
|
||||
```
|
||||
|
||||
## 最佳实践
|
||||
|
||||
BIN
playwright.rar
Normal file
BIN
playwright.rar
Normal file
Binary file not shown.
@ -1,22 +1,34 @@
|
||||
@echo off
|
||||
echo Starting automated tests...
|
||||
cd /d %~dp0
|
||||
server {
|
||||
listen 80;
|
||||
server_name devops.iscmtech.com;
|
||||
|
||||
:: 设置控制台编码为UTF-8
|
||||
chcp 65001 > nul
|
||||
|
||||
:: 设置默认环境为dev
|
||||
if "%1"=="" (
|
||||
set TEST_ENV=dev
|
||||
) else (
|
||||
set TEST_ENV=%1
|
||||
)
|
||||
|
||||
echo [Batch] Preparing to run tests in %TEST_ENV% environment...
|
||||
|
||||
:: 运行测试并发送报告
|
||||
set NODE_ENV=%TEST_ENV%
|
||||
node src/scripts/runTestsAndSendReport.js
|
||||
|
||||
echo.
|
||||
echo [Batch] Execution completed
|
||||
location ~ ^/(deploy/longi|notice/zentao/statistics) {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /deploy-ease/ {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /prod/longi/ {
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location /order/longi/ {
|
||||
proxy_pass http://127.0.0.1:8084;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
@ -74,7 +74,7 @@ async function runTestsAndSendReport() {
|
||||
if (fs.existsSync(reportPath)) {
|
||||
const performanceReport = fs.readFileSync(reportPath, 'utf8');
|
||||
const result = await emailService.sendMail({
|
||||
to: 'dengqichen@iscmtech.com',
|
||||
to: 'wanghaipeng@iscmtech.com',
|
||||
subject: `[失败] Playwright自动化测试报告 (${env}) - ${startTime.toLocaleDateString()}`,
|
||||
html: performanceReport
|
||||
});
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"text": "主数据",
|
||||
"path": "主数据",
|
||||
"hasThirdMenu": true
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"text": "业务数据",
|
||||
"path": "业务数据",
|
||||
"hasThirdMenu": true
|
||||
}
|
||||
]
|
||||
@ -1 +0,0 @@
|
||||
[]
|
||||
Loading…
Reference in New Issue
Block a user