I am testing UR5e inspection-result parsing on our training bench without the controller. The coupon is fixture-mounted in the application, but this is only a software test. My mock returns true for every method. I need it to expose interface mistakes without pretending it simulates the cell.
Start by making the substitute implement only the interface your application actually uses. Its return values should follow the installed library's documented contract; a universal success value hides both caller and parser errors.
I have just been discussing test traces elsewhere. A small readable sequence helps here too: request, supplied response, parser decision. When the test fails, you can see whether the substitute delivered the intended case instead of wondering about fictional controller behaviour.
No, Alex. Documented examples can support initial contract tests, provided their origin and version are recorded. Actual supported captures would later check assumptions that examples do not cover.
A wrong name currently gets the same true value. That is the first defect to remove. I also have no distinction between a failed read and a successful empty result.
I disagree with waiting on all the awkward cases. A malformed response is cheap to supply, and the parser must not turn it into a plausible inspection result. No controller physics needed for that.
The substitute now rejects names outside our small interface. I have separate fixtures for a supported result, an unsuccessful response and missing data. The missing-data case exposed a parser assumption.
Useful finding. Does the test assert the caller's visible outcome as well as the parser's return? An old result left on screen could still make this appear successful.