Java Swing GUI 的自动化测试 [英] Automated tests for Java Swing GUIs

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

问题描述

有哪些选项可以为用 Java Swing 编写的 GUI 构建自动化测试?

What options are there for building automated tests for GUIs written in Java Swing?

我想测试一些使用 NetBeans Swing GUI Builder 编写的 GUI,因此不需要对被测代码进行特殊篡改即可工作的东西将是理想的.

I'd like to test some GUIs which have been written using the NetBeans Swing GUI Builder, so something that works without requiring special tampering of the code under test would be ideal.

推荐答案

最近我遇到了 FEST,它看起来很有希望,除了开发人员 在 2012 年宣布不会继续开发.

Recently I came across FEST which seemed promising, except that the developer announced in 2012 that development would not continue.

AssertJ 是 FEST 的一个分支,对我来说效果很好.它得到积极维护(在撰写本文时),支持 Java 8,对一些流行的库(如 Guava 和 Joda Time)有断言,并且有很好的文档记录.它也是免费和开放的.

AssertJ is a fork of FEST that is working very well for me. It is actively maintained (at time of writing), supports Java 8, has assertions for a few popular libraries such as Guava and Joda Time, and is very well documented. It is also free and open.

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

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