GUI测试 [英] GUI Testing

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

问题描述

我正在研究测试我的GUI的问题,我不完全确定这里的最佳方法。我的GUI是使用传统的MVC框架构建的,因此我可以轻松地测试GUI的逻辑部分,而无需启动GUI本身。但是,在测试GUI的功能时,我不确定是否应该担心单独测试GUI组件,还是应该主要关注功能测试系统。这是一个相当复杂的系统,其中经常测试GUI包括向服务器发送消息,然后观察GUI上的响应。我最初的想法是功能测试是这里的一种方式,因为我需要运行一个完整的系统来真正测试UI。

谢谢,
Jeff

解决方案 (至少)2个问题 - 环境的复杂性(服务器)和GUI的复杂性。



自动化GUI测试。所有这些都或多或少都是脆弱的,并且面对不断变化的布局需要非常持续的维护。使用它们会带来好处,但这是一个长期的好处。

另一方面,环境是一个可以被驯服的领域。如果您的应用程序使用依赖注入/反转技术进行架构(您可以将服务器组件注入到应用程序中),那么您可以使用相关服务器接口的模拟来启用脚本测试用例。



结合这两种技术可以让你自动进行GUI测试。



最后一个想法 - 祝你好运!


I'm working on the issue of testing my GUI and I'm not entirely sure of the best approach here. My GUI is built using a traditional MVC framework so I am easily able to test the logic parts of the GUI without bringing up the GUI itself. However, when it comes to testing the functionality of the GUI, I'm not really sure if I should worry about individually testing GUI components or if I should mainly just focus on functional testing the system. It's a pretty complex system in which testing the GUI frequently involves sending a message to the server and then observing the response on the GUI. My initial thoughts are that functional testing is the way to go here since I need a whole system running to really test the UI. Comments on this issue would be appreciated.

Thanks, Jeff

解决方案

You have (at least) 2 issues - the complexity of the environment (the server) and the complexity of the GUI.

There are many tools for automating GUI testing. All of them are more or less fragile and require pretty much constant maintenance in the face of changing layout. There is benefit to be gained from using them, but it's a long term benefit.

The environment, on the other hand, is an area that can be tamed. If your application is architected using the Dependency Injection/Inversion technique (where you 'inject' the server component into the application), then you can use a 'mock' of the relevant server interfaces to enable you to script test cases.

Combining these two techniques will allow you to automate GUI testing.

One final thought - good luck!

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

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