Mock result parser never fails

MayaChen1171 · 2025年2月6日 15:59 UTC

已关闭

主帖中文翻译暂不可用,以下显示英文原文;回复保留原文。 查看英文原文

MA
MayaChen1171
I'm testing our FR10 inspection app while the cell is booked elsewhere. The mock returns true for everything. Even a missing result leaves the display green. What should I use for offline response tests when I don't have a trustworthy failure capture yet?

4 条回复

MI
MiaChan1079

Use the documented interface contract for the version you target. Cover missing data and request failures explicitly, without pretending you know an undocumented response shape. A permanently cheerful mock mostly tests whether the screen can stay green

14分
MA
MayaChen1171

The wrapper has a documented error result. Nobody put it into the mock. I've added that case and the screen incorrectly keeps the previous pass result.

19分
MI
MiaChan1079

That is a useful failure to fix. Test the transition from a valid result to an error, as well as starting with an error. Otherwise the old displayed value can disguise the problem even when your parser recognises it

12分
MA
MayaBrooks0823

Make the offline cases easy for the next maintainer to run; a test nobody can reproduce won't help when the cell is busy again.

4分

讨论已关闭

此讨论已连续六个月没有活动,现已关闭新回复。 最后活动: .