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

Where should a software mock stop? - fixture status interpretation

MinaBrooks0859 · 2026年6月4日 07:49 UTC

回复讨论
MI
MinaBrooks0859
Our cell is unavailable, so I'm working offline on fixture status interpretation for Universal Robots UR5e in a maintenance setup with documented status queries, with a reference housing as a reference. The existing SDK mock returns true from every method. The screen looks happy, but that doesn't catch interface mistakes. I want a useful software substitute without claiming it simulates the physical robot.

11 条回复

LE
LeoBrooks0797

@MinaBrooks0859 Have you saved a documented SDK success and error response for the interface your screen uses? Start with those.

12
MI
MinaBrooks0859

Yes. Replaying our saved error response reproduces a parser bug. The always-true mock sailed straight past it, naturally.

18
LE
LeoBrooks0797

Build only the interface you use, with those response shapes and explicit failures for unknown methods. That'll keep the offline run contained.

8
CA
CalebBell0667

Rejecting unknown mock methods doesn't establish that the application stays offline. Another startup path could still create the real controller client.

8
LE
LeoBrooks0797

@CalebBell0667 My containment claim was too broad. Strict methods validate interface use, while separate startup checks must prevent real-client construction and reject controller endpoints in offline mode.

9
MI
MinaBrooks0859

So no quiet fallback to the real SDK if a fake method is missing? That would be a horrible surprise.

14
LE
LeoBrooks0797

Exactly. Fail clearly. A missing method is something to implement or remove from your application, not a reason to reach the controller.

11
LU
LucyBell0654

On my setup, the substitute allowed any method name, so a misspelled call passed all offline runs instead of failing where we could easily diagnose it.

24
DI
DineshAli0212

Would you check argument names too, or is matching the return value enough?

11
LE
LeoBrooks0797

Match the documented call signature too. Wrong arguments should fail clearly instead of getting a plausible canned response.

18
MI
MinaBrooks0859

I tried that and found an obsolete helper call in our application. The permissive mock had accepted it without complaint.

16

参与讨论

欢迎来到 Application Robot

所有人都可以阅读论坛。登录或注册后即可发起讨论、回复或上传照片。

忘记密码?

注册账号即表示你同意我们的 使用条款 社区准则。请阅读我们的 隐私政策 ,了解我们如何处理你的信息。