集成测试分布式 Java EE 应用程序
我们设置了 3 个不同的 Java EE 服务器,所有服务器都与 JGroups 和 RMI 进行通信。我们对我们的代码进行了大量的单元测试,整个团队完全赞成待定,但在集成测试我们的服务器时我们面临着问题。
特别是我们的自定义故障转移/重新连接/终止检测“算法”需要一些自动化测试,因为我们经常看到它们损坏,而我们目前总是通过反复试验来修复它。
我们正在使用以下库/框架:Tomcat、Maven、Spring 3、RMI、JGroups
欢迎任何想法、建议、链接和资源!
We are having a setup of 3 different Java EE Servers, all communicating with both JGroups and RMI. We are heavily unit testing our code and the whole team is totally in favor of TBD, but we are facing problems when it comes to integration testing our servers.
Especially our custom fail-over/ reconnect/ termination detection "algorithms" would need some automated testing because we are often seeing that they break and we currently always fix it by trial and error testing.
We are using the following libraries/frameworks: Tomcat, Maven, Spring 3, RMI, JGroups
Any ideas, suggestions, links and resources are welcome!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有趣的是,自 2011 年以来就没有人回答这个问题。也许没有什么可推荐的?
如果您只考虑集成测试,那就容易得多。您可以编写常用的 JUnit/TestNG 测试并使用 arquillian 来处理容器(生命周期、部署、配置等)。您可以在单个节点上运行所有组件(测试、容器、部署),绑定到不同的 IP 或端口,让 JGroups 照常进行所有集群通信。
http://arquillian.org/
此外,现在有一本关于集成测试的整本书,名为“连续企业” Java 开发”。
http://www.amazon.com/Continously-Enterprise-Development-Andrew-Rubinger/ dp/1449328296
在系统测试方面,情况在我看来要糟糕得多。我在这里只想说一个名字:SmartFrog,它是“强大而灵活的基于 Java 的软件框架,用于配置、部署和管理分布式软件系统”。但学习曲线很糟糕。
http://www.smartfrog.org/
Interesting that nobody answered this question since 2011. Maybe there wasn't anything to recommend?
If you are looking into integration testing only it's much easier. You can write your usual JUnit/TestNG tests and use arquillian to take care of the container (lifecycle, deployments, configuration, etc). You can run all the components (tests, containers, deployments) on a single node, bind to different IPs or ports, let JGroups do all the cluster communication as usual.
http://arquillian.org/
Moreover, there is a whole book now available about integration testing in called 'Continuous Enterprise Development in Java'.
http://www.amazon.com/Continuous-Enterprise-Development-Andrew-Rubinger/dp/1449328296
The situation is IMO much worse when it comes to system testing. I am going to just say one name here: SmartFrog which is 'powerful and flexible Java-based software framework for configuring, deploying and managing distributed software systems'. The learning curve is terrible though.
http://www.smartfrog.org/