做产品 PMaker
空格的键盘
开发时用的是「刚刚好」的样例 —— 真实数据可不是 ① 超长内容 长标题 · 长评论 · 长昵称 布局会不会破、会不会撑爆 → 截断 + 展开,或自适应 ② 零条数据 空库 · 没人用 · 还没数据 空态有没有设计,还是留白 → 空态设计 + 下一步动作 ③ 异常数据 特殊字符 · emoji · 超长数字 渲染会不会错、接口会不会崩 → 转义、容错、兜底默认值 用什么跑 真实数据,不是再造一遍样例 —— 抓一段真实的用户内容来跑 大多数「上线才发现」的毛病,这一遍就能揪出来 跑完这三遍,才敢说这一屏真的能上线

样例数据永远「刚刚好」,真实数据永远出其不意。压测就是用出其不意的那部分,把上线前的问题拦下来。

Stress-Test with Real Data

A finished feature is only the beginning. Run each edge of the real data once — oversized content, zero rows, malformed data — and most of the "only found after launch" problems get caught in this pass.

What you'll run into
  • 开发时用的都是「刚刚好」的样例数据,页面从没见过超长和空态
  • 用户的昵称、评论、标题,长度远超你的想象
  • 零条数据时,页面留下一片空白或者直接报错

Three edges you must test

Stress-testing isn't about performance — it's about data. Three classes of edge data, each run once before launch:

How to stress

The flow isn't complicated, but it demands "real":

同一张卡片,喂四种数据进去 样例数据 永远是「刚刚好」的 超长内容 撑破布局,溢出容器 (什么都没有) 零条数据 一片空白,或者直接报错 <b>标题</b> NaN undefined 异常数据 渲染出错,或者接口崩了 用真实数据,别自己编一段「比较长」的——真实的边界,长得和你想的不一样。而且每个页面都要跑,不只跑主页。 看三样:布局是否保持、状态是否清晰、还能不能继续操作。修完再压一遍,确认没有修一处破另一处。
Broken layout is a problem, blank space is a problem, and a crash is the worst kind. Stress-testing's value lives in the loop: fix one spot, rerun the pass, confirm nothing else broke.

What to fix when you find something

Each of the three classes has its own fix: