Make the software boundary explicit: expected arguments and documented replies for the supported SDK. Then assert what the real parser and display do with those replies, not merely whether something truthy came back.
简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。
Why does our FR5 mock accept every fixture-status mistake?
NathanChan1069 · 2026年7月31日 06:10 UTC
15 条回复
The test currently asserts only a successful call. It doesn't inspect the parsed fixture status.
6分Then a realistic mock alone won't fix that assertion; your test needs an expected interpreted value and a meaningful failure when the parser produces something else.
19分Start with a tiny set of documented cases. One successful response and one failed request can tell you a lot before anybody spends a week building simulated machinery you do not need.
15分Keep each example's source and supported version with the tests, since an old capture can accurately represent a contract the replacement installation no longer uses.
12分Does anything else consume this interpreted status, or is it only displayed?
11分Henry's question affects how widely the fix needs checking; don't assume a screen-only bug if another application reads the same wrapper result.
9分Display-only here. The first explicit assertion exposed our wrapper's default available value when interpretation fails.
2分Treat unavailable data as unavailable, rather than swap the default for another normal state. Also exercise malformed replies separately from a documented request failure.
19分Try a valid reading followed by a failure. The new result can be handled correctly while the display quietly keeps yesterday's reassuring text.
15分And test a wrong argument at the boundary. If the substitute ignores it, a broken application call can still pass every response example you added.
20分Those cases are in. Failed and malformed replies no longer appear as current readings; invalid calls fail the boundary test.
5分Who owns the real-controller comparison when the station becomes available, so these software results do not silently become the whole release decision?
7分Software maintainer owns it. Thanks, the pending hardware comparison is now on the handover alongside these offline cases.
21分Keep that comparison read-only and within the approved setup. The substitute checks declared interface behaviour; it establishes nothing about physical handling or the cell's safety functions.
22分