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

How should our FR10 fixture-status mock reject a bad call?

HazelAli0223 · 2025年10月1日 21:49 UTC

已关闭
HA
HazelAli0223
Our offline fixture-status mock returns true for everything. Even a misspelled call passes. What should it check?

21 条回复

CA
CallumBennett0708

Make unknown calls fail instead of inventing a method for them, and match the documented argument and return shapes at the small interface your application actually uses

11
RI
RickShift

Does the screen distinguish no reading from a clear fixture?

21
RA
RachelBrooks0870
回复 RickShift

Rick's distinction caught us in a screen review. Everything was green because the substitute only knew good news. We needed to see what the operator faced when nothing useful came back, not another successful pretend cycle.

13
TO
TobyArcher0405

Give failures documented shapes too. Returning false for every failure can hide another parser mistake.

9
OM
OmarChen1187

Toby, would you start with captured replies or the documentation? We have only a few examples on our teaching laptop, all successful.

8
HA
HazelAli0223
回复 RickShift

Rick, no distinction yet. Programmer is adding explicit unavailable display cases. We have two captured successful replies.

9
TO
TobyArcher0405

Omar, use both, with their source and SDK version identified. Don't call constructed examples captures.

17
AM
AmaraBarnes0600

Can someone taking over the teaching laptop find which examples are real and which were constructed, without opening every test file?

18
CA
CallumBennett0708

Amara, put that beside the examples, and keep the mock narrow; building a cheerful substitute for the entire SDK is how you end up back at true for everything

23
RA
RachelBrooks0870

I wouldn't make the screen tests too narrow, though. A stale last-good reading confused our reviewers more than a totally blank startup. Those are two different experiences for the person looking at it.

17
CA
CallumBennett0708

Narrow API, Rachel, not only one screen state; test the failed and stale cases through that same small interface

8
OM
OmarChen1187

Thanks, Toby. That source label helps. I'd been calling our hand-built examples recordings, which is asking for confusion later.

8
HA
HazelAli0223

Mock now rejects unknown methods and wrong arguments. Unexpected return shapes exercise the parser's unavailable path.

6
RI
RickShift

What does unavailable look like now?

14
RA
RachelBrooks0870

And Hazel, can a reviewer tell whether there has never been a valid reading or the latest request failed after one? That was the awkward bit in ours.

18
HA
HazelAli0223

Rick and Rachel, current status becomes unavailable; details show the last valid reading and its age, when one exists.

19
AM
AmaraBarnes0600

That sounds easier to hand over than a green state which secretly means yesterday, though I would still show it to somebody who has not helped design it.

7
TO
TobyArcher0405

Are delayed replies included, or only immediate returns?

25
OM
OmarChen1187

Toby, that's the bit I'd struggle with. Our simple mock just answers when called. Would a controlled event queue be appropriate for an asynchronous interface?

8
HA
HazelAli0223

Delay cases are next, Toby. Current tests cover calls and parsing only, not the physical fixture or robot.

21

讨论已关闭

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