简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。

A mock that even passes a misspelled status call

MinaBennett0772 · 2025年11月11日 00:07 UTC

已关闭
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 条回复

FE
FelixAdams0110

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
MI
MinaBennett0772

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
MI
MiaAli0209

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
OM
OmarChen1187
回复 MiaAli0209

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

6
MI
MiaAli0209

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
MI
MinaBennett0772

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
NA
NaomiBaker0506
回复 MiaAli0209

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

17
FE
FelixAdams0110

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
OM
OmarChen1187

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

9
FE
FelixAdams0110

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
MI
MinaBennett0772

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
MI
MiaAli0209

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
MI
MinaBennett0772
回复 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
OM
OmarChen1187

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

9
FE
FelixAdams0110

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
NA
NaomiBaker0506

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

17

讨论已关闭

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