Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multi-language integration testing framework

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.

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.

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

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.

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?

like image 249
kappolo Avatar asked Mar 19 '13 12:03

kappolo


People also ask

Which framework is used for integration testing?

Framework for Integrated Test, or "Fit", is an open-source (GNU GPL v2) tool for automated customer tests. It integrates the work of customers, analysts, testers, and developers. Customers provide examples of how their software should work.

What is Citrus framework?

Citrus is an open-source framework that can help you automate integration tests for virtually any messaging protocol or data format. If you have a test flow that requires your application to interact with other services, then APIs and components using functional test tools such as Selenium can't help.


1 Answers

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.

It supports selenium scripts out of the box if you plug in https://github.com/nablex/glue-selenese and is very extensible.

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: 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!)

like image 200
nablex Avatar answered Oct 26 '22 17:10

nablex