Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-playwright-web-spd
Commits
87a14351
Commit
87a14351
authored
Sep 15, 2026
by
liguangyu06
Browse files
Default CI execution to the full regression suite.
parent
39cf33bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Jenkinsfile
View file @
87a14351
...
@@ -78,8 +78,8 @@ pipeline {
...
@@ -78,8 +78,8 @@ pipeline {
parameters
{
parameters
{
choice
(
choice
(
name:
'SUITE'
,
name:
'SUITE'
,
choices:
[
'
smoke'
,
'login
'
,
'nightly'
,
'
full
'
,
'center'
,
'dept'
,
'invoice'
,
'trace'
,
'consume'
,
'recon'
,
'cost'
,
'warn'
,
'pol'
,
'exc'
,
'ana'
,
'ops'
,
'reag'
,
'invoice-trace'
,
'recon-cost'
,
'extended'
,
'quarantine'
],
choices:
[
'
full
'
,
'nightly'
,
'
smoke'
,
'login
'
,
'center'
,
'dept'
,
'invoice'
,
'trace'
,
'consume'
,
'recon'
,
'cost'
,
'warn'
,
'pol'
,
'exc'
,
'ana'
,
'ops'
,
'reag'
,
'invoice-trace'
,
'recon-cost'
,
'extended'
,
'quarantine'
],
description:
'执行
套件(见 config/suites.config.mjs
)'
description:
'执行
方式(默认 full 全量回归,含 @full 全列排序
)'
)
)
string
(
name:
'WORKERS'
,
defaultValue:
'3'
,
description:
'单进程内并行文件数(同一 spec 不拆开)'
)
string
(
name:
'WORKERS'
,
defaultValue:
'3'
,
description:
'单进程内并行文件数(同一 spec 不拆开)'
)
string
(
name:
'SHARDS'
,
defaultValue:
'1'
,
description:
'本机分片进程数;夜间建议 2,总浏览器约 SHARDS×WORKERS'
)
string
(
name:
'SHARDS'
,
defaultValue:
'1'
,
description:
'本机分片进程数;夜间建议 2,总浏览器约 SHARDS×WORKERS'
)
...
...
docs/jenkins.md
View file @
87a14351
...
@@ -59,7 +59,7 @@ npm run test:spd:shard
...
@@ -59,7 +59,7 @@ npm run test:spd:shard
## 任务配置要点
## 任务配置要点
1.
Pipeline from SCM,脚本路径
`Jenkinsfile`
1.
Pipeline from SCM,脚本路径
`Jenkinsfile`
2.
参数化:
`SUITE`
/
`WORKERS`
/
`RETRIES`
(默认
**0**
) /
`RUN_FULL`
/
`REPORT_EMAIL_TO`
2.
参数化:
`SUITE`
(默认
**full 全量**
)
/
`WORKERS`
/
`RETRIES`
(默认
**0**
) /
`RUN_FULL`
/
`REPORT_EMAIL_TO`
3.
勾选「构建后操作」前先跑通一次 smoke,确认 HTML / JUnit 能打开
3.
勾选「构建后操作」前先跑通一次 smoke,确认 HTML / JUnit 能打开
4.
失败不要当成「没跑」:
`post { always }`
会归档报告;看
`reports/latest/summary.json`
4.
失败不要当成「没跑」:
`post { always }`
会归档报告;看
`reports/latest/summary.json`
5.
共享 Agent 建议
`WORKERS=2~3`
;夜间可
`SHARDS=2`
(总浏览器约 SHARDS×WORKERS,不要超过 6)
5.
共享 Agent 建议
`WORKERS=2~3`
;夜间可
`SHARDS=2`
(总浏览器约 SHARDS×WORKERS,不要超过 6)
...
...
scripts/run-ci.mjs
View file @
87a14351
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
* Jenkins / 本地统一入口:按套件执行 Playwright,并落盘 HTML + JUnit + Allure。
* Jenkins / 本地统一入口:按套件执行 Playwright,并落盘 HTML + JUnit + Allure。
*
*
* node scripts/run-ci.mjs --list
* node scripts/run-ci.mjs --list
* node scripts/run-ci.mjs # 默认 full 全量
* node scripts/run-ci.mjs --suite=smoke
* node scripts/run-ci.mjs --suite=smoke
* node scripts/run-ci.mjs --suite=nightly --shards=2
* node scripts/run-ci.mjs --suite=nightly --shards=2
* node scripts/run-ci.mjs --suite=nightly --shard=1/2
*
*
* 产物:
* 产物:
* reports/ci-<buildId>/ 本次完整归档
* reports/ci-<buildId>/ 本次完整归档
...
@@ -32,7 +32,7 @@ const PLAYWRIGHT_CLI = path.join(ROOT, 'node_modules/playwright/cli.js');
...
@@ -32,7 +32,7 @@ const PLAYWRIGHT_CLI = path.join(ROOT, 'node_modules/playwright/cli.js');
function
parseArgs
(
argv
)
{
function
parseArgs
(
argv
)
{
const
out
=
{
const
out
=
{
suite
:
process
.
env
.
SUITE
||
'
nightly
'
,
suite
:
process
.
env
.
SUITE
||
'
full
'
,
extra
:
[],
extra
:
[],
list
:
false
,
list
:
false
,
help
:
false
,
help
:
false
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment