Where should a software mock stop? - fixture status interpretation

MinaBrooks0859 · 4 Jun 2026, 07:49 UTC

Reply to discussion
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 replies

LE
LeoBrooks0797
Replying to MinaBrooks0859

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

12 points
MI
MinaBrooks0859
Replying to LeoBrooks0797

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

18 points
LE
LeoBrooks0797
Replying to MinaBrooks0859

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

8 points
CA
CalebBell0667
Replying to LeoBrooks0797

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

8 points
LE
LeoBrooks0797
Replying to CalebBell0667

@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 points
MI
MinaBrooks0859
Replying to LeoBrooks0797

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

14 points
LE
LeoBrooks0797
Replying to MinaBrooks0859

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

11 points
LU
LucyBell0654
Replying to LeoBrooks0797

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 points
DI
DineshAli0212
Replying to LucyBell0654

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

11 points
LE
LeoBrooks0797
Replying to DineshAli0212

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

18 points
MI
MinaBrooks0859
Replying to LeoBrooks0797

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

16 points

Add to the discussion

Welcome to Application Robot

Everyone can read the forum. Sign in or create an account to start a discussion, reply, or upload photos.

Forgot your password?

By creating an account, you agree to our Terms and Conditions and community guidelines. Read our Privacy Policy for how your information is handled.