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:
- Oversized content. Long titles, long comments, long nicknames, a very long paragraph — does the layout break, does the list blow up, do cards deform. Real users include such people; don't bet they don't.
- Zero rows. Just launched, a new account, nobody using it — when the page has nothing to show, is it a designed empty state, or leftover blank space and an error? See Cover All Four States.
- Malformed data. HTML, emoji, very long numbers, special symbols, records with missing fields — does rendering error, does the interface crash. This class is the best at exposing the assumption that "data is plain text".
How to stress
The flow isn't complicated, but it demands "real":
- 用真实数据,不要再造一遍样例。抓一段真实的用户内容来跑,别自己编一段「比较长」的。真实的边界,长得和你想的不一样。
- 每个边界各跑一遍。别只跑「正常」那一遍。超长、零条、异常,三个各来一遍,而且每个页面都要跑——不只跑主页。
- 看三样东西:布局是否保持、状态是否清晰、还能不能继续操作。破布局是问题,留一片空白是问题,报错卡死是更严重的问题。
- 放进走查清单。压测不该是临时起意,应该每次上线前都做。参见走查清单。
What to fix when you find something
Each of the three classes has its own fix:
- 超长 → 截断 + 展开,或自适应换行。给文本一个上限,超出的截断、给入口展开。别指望用户「不会写那么长」。
- 零条 → 设计空态。告诉用户「这里还没有东西」,并给出下一步动作。空态不是文案填空,是一次完整的引导。
- 异常 → 转义、容错、兜底默认值。特殊字符要转义再渲染,脏数据要容错不崩溃,缺字段要有默认值顶住。参见列状态清单。
- 修完再压一遍。压测的价值在「循环」:修一处,重跑一遍,确认不破别处。别修完就上线。
