first-commit
ci / Validate workspace (push) Has been cancelled
landing-page-ci / Validate landing page (push) Has been cancelled
landing-page-deploy / Deploy landing page (push) Has been cancelled
github-metrics / Generate repository metrics SVG (push) Has been cancelled
refresh-contributors-wall / Refresh contributors wall cache bust (push) Waiting to run
ci / Validate workspace (push) Has been cancelled
landing-page-ci / Validate landing page (push) Has been cancelled
landing-page-deploy / Deploy landing page (push) Has been cancelled
github-metrics / Generate repository metrics SVG (push) Has been cancelled
refresh-contributors-wall / Refresh contributors wall cache bust (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# UI 测试报告
|
||||
|
||||
这个目录存放 UI 自动化测试的运行结果和可读报告。
|
||||
|
||||
## 目录说明
|
||||
|
||||
- `latest.md`:最近一次测试运行的 Markdown 汇总报告
|
||||
- `ui-test-report.html`:给人直接打开的 HTML 报告入口
|
||||
- `playwright-html-report/`:Playwright 原生 HTML 报告目录,内部入口仍是 `index.html`
|
||||
- `results.json`:Playwright JSON 原始结果
|
||||
- `junit.xml`:JUnit 格式结果,方便接 CI
|
||||
- `test-results/`:失败用例的截图、trace、error-context 等原始附件
|
||||
|
||||
每次执行 `pnpm run test:ui`(或 `pnpm --filter @open-design/e2e test:ui`)前,系统会先自动清理旧的:
|
||||
|
||||
- `e2e/.od-data/`
|
||||
- `e2e/reports/test-results/`
|
||||
- `e2e/reports/playwright-html-report/`
|
||||
- `e2e/reports/results.json`
|
||||
- `e2e/reports/junit.xml`
|
||||
- `e2e/reports/latest.md`
|
||||
|
||||
这样报告和测试数据默认只反映最近一次执行结果,不会把上一次残留混进来。
|
||||
|
||||
## 怎么看
|
||||
|
||||
如果你想快速判断“这次到底测了什么、有没有过”,先看:
|
||||
|
||||
- [latest.md](/Users/mac/open-design/open-design/e2e/reports/latest.md)
|
||||
- [ui-test-report.html](/Users/mac/open-design/open-design/e2e/reports/ui-test-report.html)
|
||||
|
||||
它会包含:
|
||||
|
||||
- 本次执行时间
|
||||
- 总用例数、通过数、失败数
|
||||
- 每条 case 的结果、耗时、重试次数
|
||||
- 失败时对应的错误摘要和附件路径
|
||||
|
||||
如果你想看更细的失败上下文,再看:
|
||||
|
||||
- `e2e/reports/playwright-html-report/`
|
||||
- `e2e/reports/test-results/`
|
||||
|
||||
## 和用例库的关系
|
||||
|
||||
- `e2e/cases/`:定义“应该测什么”
|
||||
- `e2e/reports/`:记录“这次实际测了什么、结果如何”
|
||||
|
||||
这两层分开以后,既能看覆盖设计,也能看真实执行结果。
|
||||
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Open Design UI Test Report</title>
|
||||
<meta http-equiv="refresh" content="0; url=./playwright-html-report/index.html" />
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: light;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background: #f6f3ee;
|
||||
color: #201d18;
|
||||
}
|
||||
main {
|
||||
width: min(560px, calc(100vw - 48px));
|
||||
padding: 28px 32px;
|
||||
border: 1px solid #ddd4c7;
|
||||
border-radius: 18px;
|
||||
background: #fffdfa;
|
||||
box-shadow: 0 16px 40px rgba(32, 29, 24, 0.08);
|
||||
}
|
||||
h1 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 22px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
a {
|
||||
color: #b45b33;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Open Design UI Test Report</h1>
|
||||
<p>
|
||||
正在跳转到 Playwright HTML 报告。
|
||||
如果没有自动跳转,请打开
|
||||
<a href="./playwright-html-report/index.html">playwright-html-report/index.html</a>。
|
||||
</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user