简体   繁体   English

需要为GUI应用编写测试

[英]Need to write a test for a gui app

I am looking to automate control clicks, listview clicks and so forth, is there any good framework for qt that can help? 我正在寻找自动化控制点击,列表视图点击等等的方法,是否有任何可以帮助Qt的好的框架? I need to perform these tests without the source code 我需要在没有源代码的情况下执行这些测试

Qt provides its own framework for unit testing: QTestLib Qt提供了自己的单元测试框架:QTestLib

This library is part of every Qt SDK. 该库是每个Qt SDK的一部分。

You can find a tutorial here , Especially the points 3 and 4 will show a way that might be sufficient for your GUI testing needs. 您可以在此处找到教程,尤其是第3点和第4点将显示一种可能足以满足GUI测试需求的方法。

Obviously, starting from point 1 won't hurt. 显然,从第1点开始不会造成伤害。

For a full-blown UI testing framework, have a look at Squish . 对于完善的UI测试框架,请查看Squish It supports scripting of UI interactions (with Python, tcl, javascript), property and screenshots comparisons. 它支持脚本编写UI交互(使用Python,tcl,javascript),属性和屏幕截图比较。 It requires you to purchase license(s), but it's well worth the money if you do commercial software development. 它要求您购买许可证,但是如果您进行商业软件开发,这是非常值得的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM