多语言集成测试框架 [英] Multi-language integration testing framework

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

问题描述

想象一下,您有一个由不同组件构成的相当复杂的面向服务的体系结构。组件使用不同的语言(Java,PHP,Ruby)编写,并以不同的方式相互通信(即UI,REST API,在某些情况下共享一些数据库表等)。

Imagine that you have a fairly complex service-oriented architecture made by different components. Components are written in different languages (Java, PHP, Ruby) and communicate with each other in different ways (i.e. UI, REST API, in some cases sharing some DB tables, etc).

我正在尝试为一些端到端测试设计集成测试框架。
我们已经对单个组件进行了单元/集成测试,但是我们希望构建一些能够端到端地完全测试我们部署的系统(在真实环境中)的东西,以确保功能(就预期而言)正确提供了各个组件的行为,并且正确配置了体系结构。

I am trying to design an integration testing framework for some end-to-end testing. We already have unit/integration tests for the single components, but we would like to build something that fully tests our deployed system (in a real environment) end-to-end to make sure the functionalities (in terms of expected behaviours of the individual components) are provided correctly and that the architecture is configured correctly as well.

我面临的第一个问题是我们的大多数UI都是写的在PHP和UI集成测试中已经为它编写了Cucumber和顶部的几个插件。
我正在编写的测试框架(用Java)应该触发这些功能测试,然后检查相关组件的行为是否符合预期。

The first problems that I'm facing is that most of our UI is written in PHP and UI integration tests are already written for it with Cucumber and a couple of plugins on top. The testing framework I'm writing (in Java) should trigger these features tests and afterwards check that the behaviour of related components is as expected.

显然,我可以使用像Selenium这样的Java友好组件重写UI测试,但复制工作没有意义。

Obviously, I could rewrite the UI tests using a Java-friendly component like Selenium, but it doesn't make sense to duplicate the effort.

另一个解决方案是运行现有的测试在Java中使用exec()调用,等待它们返回,可能解析输出并继续执行需要完成的其他操作/检查。

Another solution is to run the existing tests with an exec() call within Java, wait that they return, possibly parse the output and proceed with the other actions/checks that need to be done.

嵌入现有的考虑到项目的编写方式,Java中的PHP代码似乎不是一个可行的解决方案。

Embedding the existing PHP code within Java doesn't seem a viable solution given the way the projects have been written.

所描述的所有解决方案都不能令我信服。理想情况下,拥有某种多语言(和多技术)集成框架会很好,它可以插入用不同语言和不同环境/组件编写的相同测试套件测试中。

None of the solutions described sound convincing to me. Ideally, it would be nice to have some kind of multi-language (and multi-technology) integration framework that can plug-in within the same test suite tests written in different languages and for different environments/components.

有人知道朝这个方向发展的工具或框架吗?如果不是,对于这类问题有什么好办法呢?

Does anybody knows some tool or framework that goes in this direction? If not, what can be a good approach to this kind of problems?

推荐答案

不确定这是否有帮助,但可能有一个请查看 https://github.com/nablex/glue 。这是我开发的一种脚本语言,专注于(集成)测试。

Not sure if this can help but maybe have a look at https://github.com/nablex/glue. It's a scripting language I have developed with a focus on (integration) testing.

如果插入 https://github.com/nablex/glue-selenese 并且非常可扩展。

我目前正在客户处使用它,并使用一些自定义扩展来运行用fox pro编写的旧脚本(我实际上重新实现了fox pro方法...... 颤抖)和传统模式,因此它们仅针对旧脚本启用,而不是新脚本。我还插入了基于SOAP的自定义Web服务,其中一个可用于在远程系统上进行数据库调用,为集成级测试提供了广泛的工具。

I'm currently using it at a customer with some custom extensions to run legacy scripts written in fox pro (I actually reimplemented fox pro methods...shiver) and a legacy mode so they are only enabled for the legacy scripts, not new ones. I have also plugged in custom SOAP-based webservices, one of which can be used to do database calls on a remote system giving me a wide range of tools for integration-level testing.

虽然脚本语言功能齐全,但我仍在忙着充实默认情况下可用的方法纲要,并仍试图将其定位为集成测试工具。让我知道它是否有帮助,或者 - 如果没有 - 为什么它不能满足您的需求,总是满意反馈! :)

While the scripting language is fully functional, I'm stilling fleshing out the compendium of methods that are available by default and still trying to position it as an integration testing tool. Let me know if it helps or -if not- why it doesn't meet your needs, always happy with feedback! :)

PS:Main类是一个开始启动和运行的好地方,因为它包含一个有效的CLI客户端(支持断点!)

PS: The "Main" class is a good place to start to get it up and running as it contains a working CLI client (with breakpoint support!)

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

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