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.
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
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.
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.