简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。

Our offline FR10 screen gets approval from every imaginary method

LeahBrown0930 · 2026年8月13日 21:06 UTC

回复讨论
LE
LeahBrown0930
I need to develop the read-only FR10 reporting application while the maintenance cell is unavailable, but our mock returns true for every method and the screen stays happy; how do I test the documented status responses without pretending this inspection-block setup is physically simulated?

18 条回复

HA
HanaArcher0361

Limit the fake to the documented interface your caller uses. Unknown methods and invalid arguments should fail the test instead of receiving universal approval.

10
HA
HazelAllen0310

Give it versioned response fixtures for supported success, unsuccessful reads and malformed data. The application should interpret them through the same boundary it uses with the real library; otherwise you may only test a special offline display path.

10
HE
HenryChen1134

I've asked about other status consumers before; include any downstream report in the test scope too.

19
FA
FarahCarter1026

What actually fails in your current tests? A wrong call, an unsuccessful response, or nothing at all? That tells us how much the green screen is concealing.

25
LE
LeahBrown0930

Nothing at all from those cases; the fake approves method names it does not understand, and the caller never receives a realistic unsuccessful response

0
JO
JoCarter1027

Start with one known wrong call and one failed response. Write down the expected visible result before changing the fake. Then you can show that the old arrangement misses the mistake and the stricter one exposes it. A large pile of cases is less useful if nobody can explain what the first failing example means.

15
IS
IsabelAdams0126

Use the documented contract to decide that expected result, though. If the test author guesses what a successful payload looks like and the caller author copies the guess, they can agree beautifully while both misunderstand the actual interface.

19
JA
JaneBaker0510

Keep uncertain contract details marked for later real-interface verification, not converted into convenient fixture values.

24
LE
LeahAli0234

Can the displayed reading become old while another request is pending? That state matters to the person watching. I would not want a success-looking screen simply because the most recent attempt has not finished yet.

9
KI
KieranCook

And test success then failure in the same session. Or success then no new data, which isn't quite the same thing. Fresh starts make stale values rather easy to miss.

19
DA
DavidBarnes0606

Keep the last known value for diagnostics only if its age and status remain clear, because unavailable now is not evidence that the previous reading was false

9
HA
HazelAllen0310

That is a display decision as well as a parser decision. I would assert the visible current-state result and the retained diagnostic value separately, if both are shown. Otherwise a test can pass because the parser rejected input while the screen still suggests a fresh normal status.

23
LE
LeahBrown0930

The stricter substitute caught a misspelled call, and our failed-response case now reaches the unavailable display state; the pending-age sequence is still untested

12
HA
HanaArcher0361

Keep the wrong-call case as a regression check. Fixing the spelling should not tempt someone to restore the permissive substitute later.

5
JO
JoCarter1027

Did the test exercise the actual wrapper entry point, or did you call the parser directly? Both can be useful, but only the first checks the connection between caller and interpretation.

7
LE
LeahBrown0930

Actual wrapper entry point for the failed response, direct caller test for the misspelling; I have recorded that split so the remaining end-to-end display cases are visible

20
LE
LeahAli0234

Give the next maintainer a small failing example they can run, with what they should see. A page saying offline tests passed won't tell them whether they accidentally removed the unavailable state while changing the screen.

20
KI
KieranCook

That should be useful when the cell returns too. The software checks can travel with the real-interface questions instead of being mistaken for proof the physical station is ready.

9

参与讨论

欢迎来到 Application Robot

所有人都可以阅读论坛。登录或注册后即可发起讨论、回复或上传照片。

忘记密码?

注册账号即表示你同意我们的 使用条款 社区准则。请阅读我们的 隐私政策 ,了解我们如何处理你的信息。