I cannot test our coupon result parser with an endlessly agreeable mock

RobinBennett0773 · 17 Apr 2026, 09:35 UTC

Closed
RO
RobinBennett0773
Our offline UR5e inspection screen accepts everything because the fake returns true for every call. I want response tests the maintainer can trust, including failed and incomplete replies, before the real station is available.

11 replies

VI
VictorAdams0098
Replying to RobinBennett0773

Replace the blanket fake with explicit calls matching your SDK version and saved response cases from that contract. Does the current test ever show a failed request after a valid coupon result?

10points
RO
RobinBennett0773
Replying to VictorAdams0098

No. We added that sequence and found the old pass stays on screen with no age or failure indication. New tests already earning their keep.

12points
LE
LeoBrown0884
Replying to RobinBennett0773

Check the exported result too. A correct screen won't help the next person reading an old pass from a report.

9points
NO
NoahBarnes0542
Replying to RobinBennett0773

Keep the legitimate negative result distinct from request failure. I've seen both labelled failed, which left the operator unable to tell whether the coupon was rejected or never read. You can test that distinction without the cell.

7points
NA
NadiaAllen0291
Replying to RobinBennett0773

And startup before any valid result.

16points
RO
RobinBennett0773
Replying to NoahBarnes0542

Parser now distinguishes a valid negative inspection result from no valid response. Missing fields, timeout and unexpected shapes show unavailable. Startup has no retained result; after a failed read, any old result is separately labelled with its age.

13points
VI
VictorAdams0098
Replying to RobinBennett0773

Try a valid result for the wrong coupon identity too. A well-shaped response can still belong somewhere else.

13points
LE
LeoBrown0884
Replying to LeoBrown0884

Robin, did the export problem exist as well?

3points
RO
RobinBennett0773
Replying to LeoBrown0884

Yes, export copied the stale pass. It now uses the same validated result state as the screen. Wrong-coupon reply remains unmatched and cannot populate the selected coupon.

11points
NO
NoahBarnes0542
Replying to RobinBennett0773

Try recovery to a matching valid reply after those failures. The screen should not stay unavailable forever just because the new tests taught it some caution.

7points
RO
RobinBennett0773
Replying to NoahBarnes0542

Recovery passes, including after reopening. Maintainer compared screen and export across the saved cases; both agree on result, identity and age. We removed the always-true fake from this suite. Thanks, Noah, the two meanings of failed were genuinely confusing.

11points

Discussion closed

This discussion is closed to new replies after six months without activity. Last activity: .