How can I make our offline FR10 check fail usefully?

SamBell0681 · 1 Nov 2025, 23:42 UTC

Closed
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 replies

FE
FelixBaker0458
Replying to SamBell0681

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 points
SA
SamBell0681
Replying to FelixBaker0458

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 points
FE
FelixAdams0110
Replying to SamBell0681

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 points
JA
JackAllen0341
Replying to SamBell0681

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 points
FE
FelixBaker0458
Replying to JackAllen0341

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 points
SA
SamBell0681
Replying to FelixBaker0458

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 points
FE
FelixBaker0458
Replying to SamBell0681

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

8 points
FE
FelixAdams0110
Replying to FelixBaker0458

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 points

Discussion closed

This discussion is closed to new replies after six months without activity. Last activity: .