How can I make our offline FR10 check fail usefully?

SamBell0681 · 2025年11月1日 23:42 UTC

已关闭

主帖中文翻译暂不可用,以下显示英文原文;回复保留原文。 查看英文原文

SA
SamBell0681
I changed a field name by mistake and our offline inspection screen carried on showing ready. The fake SDK just returns true, so it never supplied that field in the first place. I'm helping maintain this while the cell is unavailable. What should I give the programmer so the next beginner mistake is caught instead of celebrated?

8 条回复

FE
FelixBaker0458

Start with the documented response for the installed interface version and the code that reads it. Your fake should supply that shape, including a documented unsuccessful response. Otherwise you're testing how the screen reacts to true, which you've now established rather thoroughly.

12分
SA
SamBell0681

We have the version and response description. The programmer found that a missing value gets changed to ready by a default in our wrapper. So the fake and the wrapper were helping each other hide it.

21分
FE
FelixAdams0110

Please include good reading then failed reading, because I've seen an old value sit there looking perfectly current after the request that should have replaced it failed

23分
JA
JackAllen0341

Our apprentice handover used to say run the tests, without showing a failure. Give the next person your misspelled field example and the expected failure message. Much easier to trust a test you've seen complain.

9分
FE
FelixBaker0458

Jack's example is useful. Keep a malformed-response case separate from the documented unsuccessful response, though. One means the interface contract isn't being met; the other can be an ordinary reported outcome.

24分
SA
SamBell0681

Thanks Jack, I'll keep my typo as the example. Felix Baker, those are separate now in the proposed tests. Felix Adams, the screen still needs the old-value case; I hadn't included a second read at all.

6分
FE
FelixBaker0458

Does the corrected wrapper give you an explicit unavailable state, or does it just throw an error the screen never handles?

8分
FE
FelixAdams0110

And don't hide that error in a log nobody in the lesson can see. I don't know your parser, but I do know a green box wins every argument with a buried warning

3分

讨论已关闭

此讨论已连续六个月没有活动,现已关闭新回复。 最后活动: .