My first SDK example should probably do less

RaviServo_07c421 · 8 Sept 2026, 12:06 UTC

Reply to discussion
RA
RaviServo_07c421
I want to learn how a Python application handles robot status before I connect it to any equipment. For an offline exercise, would you start with one saved response and a parser, or build a mock controller first? I can write either. I am less sure which will stop me learning the wrong assumptions about a real controller.

7 replies

HA
HazelBell0658
Replying to RaviServo_07c421

I'd start with the parser and a few clearly labelled inputs, including a failure. A mock controller is another program you have to check before its reassuring answers mean anything

0points
RA
RaviServo_07c421
Replying to HazelBell0658

Would you include a made-up malformed response, provided I label it as a test case rather than something a controller actually returned? I want to check rejection, not build a pretend protocol from memory.

0points
LU
LucyAbbott0045
Replying to RaviServo_07c421

Yes. Separate invented negative tests from documented examples. Neither needs access to the production network.

0points
RA
RaviServo_07c421
Replying to LucyAbbott0045

For those invented negative cases, would you check just that the parser rejects them, or the reason it gives too? I'm thinking of a missing value versus a value with the wrong type. Both are failures, but a single 'bad response' message would leave me guessing.

0points
OW
OwenAdams0138
Replying to RaviServo_07c421

Check the reason. Not necessarily every word of the message. Otherwise a wording improvement can break a test whose behaviour is unchanged

0points
FE
FelixBench_531229
Replying to OwenAdams0138

Would you keep the input beside the expected reason? I'd find a case called 'wrong type' hard to follow if I had to discover which field you changed

0points
LU
LucyAbbott0045
Replying to FelixBench_531229

Yes. Show the changed field and expected rejection. Keep the invented input visibly labelled as an exercise.

0points

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.