A mock that even passes a misspelled status call

MinaBennett0772 · 11 Nov 2025, 00:07 UTC

Closed
MI
MinaBennett0772
I deliberately misspelled our FR10 result method and the offline screen still went green. The mock returns true for anything it is asked. Not a subtle failure. The cell is unavailable, but I've got the SDK version and some saved replies from our own status collector. I want tests that break when our code is wrong, not a pretend robot that reassures everybody.

16 replies

FE
FelixAdams0110
Replying to MinaBennett0772

Start by making that typo fail visibly. I'm not your SDK expert, but the screen should not look successful when the test substitute has just been asked to do something it doesn't support.

11 points
MI
MinaBennett0772
Replying to FelixAdams0110

The developer can restrict the method names. I'm keeping the typo as a test. What should the valid method return, though: our saved replies or something smaller?

14 points
MI
MiaAli0209
Replying to MinaBennett0772

We found a parser that accepted any nonempty reply. Small made-up happy replies would have missed it. Use your version-linked examples for the shapes you actually handle, then add explicit failures and unexpected shapes.

18 points
OM
OmarChen1187
Replying to MiaAli0209

Could the saved replies contain somebody's part identifiers? I mean before they go into a shared teaching folder.

6 points
MI
MiaAli0209
Replying to OmarChen1187

Yes, worth checking. Keep the structure and the relationships needed by the test, but don't carry unrelated production details into the teaching material.

7 points
MI
MinaBennett0772
Replying to OmarChen1187

They're local maintenance examples, but Omar is right, one includes a job description we don't need. The developer will prepare reviewed fixtures from them. The raw originals stay separately with their version notes.

19 points
NA
NaomiBaker0506
Replying to MiaAli0209

A passing parser test still doesn't tell you whether the operator reads the screen correctly.

17 points
FE
FelixAdams0110
Replying to NaomiBaker0506

Naomi, especially after a good reading followed by a failed one. I've seen the old number keep winning because it was large and green while the failure message was tucked underneath.

20 points
OM
OmarChen1187
Replying to FelixAdams0110

Would you remove the old number altogether, Felix? I can see why keeping it could confuse people.

9 points
FE
FelixAdams0110
Replying to OmarChen1187

Not necessarily. Last known can be useful. Just stop presenting it as current, and show how old it is. I don't want a big reassuring number with a tiny technical excuse attached.

8 points
MI
MinaBennett0772
Replying to FelixAdams0110

The first failing-response test caught exactly that: our screen retained green styling from the previous success. The parser returned failure correctly. We would have missed it by testing the parser alone.

18 points
MI
MiaAli0209
Replying to MinaBennett0772

That's a useful split in the tests. Check the parsed state, then the displayed state after a sequence of reads. Keep the first-read failure too, when there isn't any earlier number to fall back on.

12 points
MI
MinaBennett0772
Replying to MiaAli0209

Now tested: unknown method, wrong argument, unexpected response shape, first failure, and good then failed. They fail or display unavailable as intended. Old values are labelled and aged separately. These are offline checks; the installed interface comparison still has to happen.

8 points
OM
OmarChen1187
Replying to MinaBennett0772

Thanks for listing them. Did you include an old response arriving after a newer one?

9 points
FE
FelixAdams0110
Replying to MinaBennett0772

And get someone from the actual shift to read that revised display. Our idea of obvious can be surprisingly generous to our own work.

8 points
NA
NaomiBaker0506
Replying to OmarChen1187

Mina, keep Omar's late-response question open if it isn't in the test set yet.

17 points

Discussion closed

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