Flat
默认单行 · 20px / Default, 20px
URL
https://badge.midscenejs.com/e2e?pass=42&fail=3Markdown
为 README 和文档生成 SVG badge。选择样式,替换通过和失败数量,即可使用下方 URL 或 Markdown。
SVG badges for READMEs and docs. Pick a style and replace the counts in the URL or Markdown below.
https://badge.midscenejs.com/e2e?pass=<n>&fail=<n>[&style=flat|large|card][&theme=light|dark]方括号表示可选参数,使用时不要保留。/ Square brackets mark optional parameters; omit the brackets.
| 参数 / Parameter | 规则 / Rule |
|---|---|
| pass / fail | 必填,0–9999999 的整数,分别表示通过数和失败数。 Required integers from 0 to 9999999: passed and failed counts. |
| style | 可选:flat(默认,20px)、large(28px)、card(双行,60px)。 Optional: flat (default, 20px), large (28px), card (two lines, 60px). |
| theme | 可选:light(默认)或 dark,仅影响 card 样式。 Optional: light (default) or dark; only affects card badges. |
数字由 URL 提供,不会自动读取 CI 或报告。卡片总数为 pass + fail,通过率为 pass / 总数;总数为 0 时显示 0%。失败数为 0 时,失败部分显示灰色。
Counts come from the URL, not CI or reports. Cards show the total and pass rate (0% for an empty run). Zero failures appear grey.
无效参数返回 HTTP 400 和错误说明。SVG 缓存时间为 24 小时。
Invalid parameters return HTTP 400 with an explanation. SVG responses are cached for 24 hours.
默认单行 · 20px / Default, 20px
https://badge.midscenejs.com/e2e?pass=42&fail=3大号单行 · 28px / Large, 28px
https://badge.midscenejs.com/e2e?pass=42&fail=3&style=large浅色卡片 · 60px / Light card, 60px
https://badge.midscenejs.com/e2e?pass=42&fail=3&style=card&theme=light深色卡片 · 60px / Dark card, 60px
https://badge.midscenejs.com/e2e?pass=42&fail=3&style=card&theme=dark全部通过 / No failures
https://badge.midscenejs.com/e2e?pass=45&fail=0暂无测试 · 通过率 0% / Empty run, 0%
https://badge.midscenejs.com/e2e?pass=0&fail=0&style=card