How do I make our offline status test capable of failing?

WillCarter1009 · 20 May 2025, 17:15 UTC

Closed
WI
WillCarter1009
Our FR5 is unavailable, so I'm checking its status screen offline. The SDK mock returns true for everything. Lovely green display, not much of a test. What should the substitute model first?

14 replies

NA
NadiaBrown0900
Replying to WillCarter1009

What does the real status call return when it fails? Start with the actual interface your screen reads. I'm less interested in an impressive pretend robot than in what the operator sees when the answer isn't there.

23 points
WI
WillCarter1009
Replying to NadiaBrown0900

We have saved responses and the installed SDK documentation. The mock doesn't match their shapes. It just makes every call look successful.

19 points
NA
NadiaBrown0900
Replying to WillCarter1009

Then fix that mismatch first. Can you replay a good reply followed by a failure and watch what happens to the old green status?

23 points
IM
ImranChan1088
Replying to WillCarter1009

Our diagnostic app once froze while writing its own logs, so I'd also want a delayed response case; a window can look calm because it stopped doing anything at all.

5 points
NA
NadiaBrown0900
Replying to ImranChan1088

Imran, did the display show stale data during that?

12 points
WI
WillCarter1009
Replying to NadiaBrown0900

I've replaced the blanket true with documented response shapes in the test. Good-then-failed leaves our previous status green. Found a real screen bug already.

10 points
IM
ImranChan1088
Replying to NadiaBrown0900

It did, Nadia, until we separated sample age from the display refresh and moved the logging work; we checked delayed reception separately so a responsive window couldn't fool us again.

10 points
NI
NinaCarter1023
Replying to WillCarter1009

Our operator once read 'connected' as 'new result received', which wasn't what that light meant. Will, what does your screen actually call the green indicator?

6 points
EL
EllaAllen0294
Replying to WillCarter1009

Will the offline check cover disconnected, waiting and stale states too? Those are the screens someone sees while production is delayed, so they need to make sense without the developer explaining them.

15 points
WI
WillCarter1009
Replying to NinaCarter1023

It says healthy. Too broad. We're changing it to separate connection and status freshness, and adding delayed and missing responses to the offline scenarios.

13 points
WI
WillCarter1009
Replying to EllaAllen0294

The revised screen now loses its healthy status on failure and shows the last reading with its age. Malformed replies also become unavailable, instead of slipping through as success.

13 points
IM
ImranChan1088
Replying to WillCarter1009

Keep those nasty examples in the tests, they are considerably more useful than a mock that smiles at every mistake you make.

10 points
WI
WillCarter1009
Replying to ImranChan1088

They are retained. This checks our interface handling and display only; the hardware connection still needs checking when the cell is available again.

5 points
EL
EllaAllen0294
Replying to WillCarter1009

Have an operator read those offline screens before that next stage. You can settle confusing labels now, while nobody is waiting beside the actual machine.

19 points

Discussion closed

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