Our FR10 mock gives a passing coupon even when the query fails

NadiaChan1074 · 5 Apr 2026, 18:50 UTC

Reply to discussion
NA
NadiaChan1074
I am testing the coupon-status display while the cell is unavailable. The substitute returns true for everything, including a deliberately broken query. The screen passes the coupon because it never sees a real response shape. I want the test to exercise our normal parser and display. It is currently an impressive demonstration of avoiding both.

12 replies

OW
OwenChen1182
Replying to NadiaChan1074

Which documented query and SDK version should it represent? Start there, then feed distinct recorded response cases through the same parser the live screen uses. A fake that politely agrees with a broken call is not helping you.

21 points
NA
NadiaChan1074
Replying to OwenChen1182

Maintenance identified the installed version and query contract. Our fake had bypassed the parser entirely and supplied an already interpreted pass. That shortcut is removed from the test path.

2 points
IS
IsabelBennett0735
Replying to NadiaChan1074

Make the successful fields deliberately different. If coupon identity and result both look like convenient ones and zeros, the parser can read the wrong thing and still win the test.

9 points
LI
LinCarter0966
Replying to NadiaChan1074

What does the screen show when no successful read has happened yet?

14 points
NA
NadiaChan1074
Replying to LinCarter0966

It displayed the previous default pass at startup. We now expect unavailable until a valid response arrives. An explicit failed-response case also exposed the parser treating a nonempty error response as success.

20 points
DI
DineshAli0212
Replying to NadiaChan1074

Does a valid rejected-coupon response remain distinct from a failure to obtain any valid result?

15 points
OW
OwenChen1182
Replying to DineshAli0212

Yes, test Dinesh's two cases separately. One is an inspection outcome and the other is a read problem. The caller needs to know which conversation to have.

8 points
NA
NadiaChan1074
Replying to DineshAli0212

Separate cases now. The screen shows the valid rejection against its coupon, and a read failure completes no inspection. It retains a previous valid observation only with its original identity and time.

5 points
IS
IsabelBennett0735
Replying to NadiaChan1074

What if the response belongs to a different coupon from the one selected on screen? Selection is another easy shortcut to smuggle into a parser.

19 points
NA
NadiaChan1074
Replying to IsabelBennett0735

That test found the display applying the result to the selected coupon. Corrected it to preserve the response identity; the selected coupon stays waiting when the other coupon's result arrives.

8 points
LI
LinCarter0966
Replying to NadiaChan1074

Did the export use the selected coupon too?

15 points
NA
NadiaChan1074
Replying to LinCarter0966

No, export already used the response identity. We now assert it alongside the screen. All defined offline cases pass; comparison with the installed interface remains for the unavailable cell's return.

12 points

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.