你如何测试可视化组件? [英] How do you test visual components?

查看:20
本文介绍了你如何测试可视化组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我了解单元测试.但我想知道:有没有办法自动化一些视觉上的东西,比如确保抗锯齿工作或网站上的圆角看起来如何?我觉得这不切实际,但我在 QA 领域的经验很少.

I think I understand unit testing. But I was wondering: is there a way to automate something visual, like making sure anti-aliasing works or that the rounded corners on a web site look how they are supposed to? I have a feeling that it just isn't practical, but I have little experience in the QA world.

推荐答案

抗锯齿有效还是网站上的圆角看起来应该如何?"

"anti-aliasing works or that the rounded corners on a web site look how they are supposed to?"

理论上您可以编写自动化工具来拍摄渲染的快照,并以某种方式解析它们并与模型进行比较.

You could theoretically write automated tools to take snapshots of the renderings and somehow parse them and compare vs the mockup.

您需要某种锚定"机制来将模型答案与渲染输出对齐,然后对其进行颜色差异,其中生成的输出是完整的黑色图像 == 完美合规.

You'd need some sort of "anchoring" mechanism to align the model answer with the rendered output and then do a colourwise diff on it, where the resulting output being a complete black image == perfect compliance.

然而,这样做无疑是极其复杂的,并且无法弥补感知的失败,例如色盲人士在色彩图校准不佳的屏幕上如何看到它.

However, doing this is undoubtedly exhaustively complicated, and wont compensate for perceptual failures such as how it is seen to a colourblind person on a screen with a poorly calibrated colourmap.

相反,您需要做的是创建一个包含应用程序中所有可能导航路径的完整树(以编程方式/测试套件驱动更容易一些),然后将规范交给一组人来完成并执行在各种平台上.

What you instead need to do is create a full tree of all navigation paths possible in the application ( a little easier to do programmatically/test suite driven ), and then hand a specification to a set of humans to go through and execute on a variety of platforms.

这将在本周处理,但会您每次都重复手动测试你对代码进行了更改?或每你什么时候发布?手动测试根本不会扩展.他们很便宜简而言之,但无可救药地代价高昂从长远来看.– 蒂姆·奥廷格

That will handle this week, but will you repeat the manual tests evey time you make a change to code? Or every time you make a release? Manual tests simply will not scale. They're cheap in the short, but hopelessly costly in the long run. – Tim Ottinger

FWIW,即使是 Firefox 仍然有一个人工驱动的测试套件.人类只是更擅长识别满足定义标准但不满足尚未任意定义的其他标准的行为,因此,还没有为其编写测试用例.

FWIW, Even Firefox still has a human driven test suite. Humans are simply better at recognising behaviour that while meeting the defined standard, does not meet some other standard that has not yet been arbitrarily defined, and thus, has not had a test-case written for it yet.

这篇关于你如何测试可视化组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆