用户界面测试 [英] User Interface Testing

查看:72
本文介绍了用户界面测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在处理一个具有新的/修改过的GUI功能的大型项目.过去我们发现添加新功能时经常在相关代码中引入新问题.

We are working on a large project with a measure of new/modified GUI functionality. We've found in the past that we often introduced new problems in related code when adding new functionality.

我们有非技术用户来执行测试,但是他们经常会漏掉零件并让漏洞漏掉.

We have non-technical users perform testing, but they often miss parts and allow bugs to slip through.

是否有用于组织WinForms项目的UI测试的最佳实践?有什么办法可以自动化?

Are there any best practices for organizing the UI testing of a WinForms project? Is there any way to automate it?

推荐答案

有些GUI测试工具会为您单击按钮和内容,但是根据我的经验,它们非常脆弱.

There are GUI testing tools that will click buttons and stuff for you but they're pretty fragile in my experience.

最好的办法是使UI层尽可能薄.最佳情况下,事件处理程序类应该只有一两行,可以调出其他可测试的类.这样,您可以在单元测试中测试您的业务逻辑,而无需实际单击按钮.

The best thing to do is to keep your UI layer as thin as possible. Your event handler classes should optimally be only one or two lines that call out to other more testable classes. That way you can test your business logic in unit tests without having to actually do a button click.

这篇关于用户界面测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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