Imagine that you have a rather complex service-oriented architecture created by various components. The components are written in different languages ββ(Java, PHP, Ruby) and interact with each other in different ways (for example, UI, REST API, in some cases they use some DB tables, etc.).
I am trying to develop an integration testing framework for some end-to-end testing. We already have unit / integration tests for individual components, but we would like to build something that fully tests our deployed system (in a real environment) to ensure functionality (in terms of the expected behavior of an individual component of the component), and that the architecture is also configured correctly.
The first problems I encountered were that most of our user interface was written in PHP, and integration tests for the UI were already written for it using Cucumber and several plugins on top. The testing framework that I write (in Java) should run these function tests and then verify that the behavior of related components is expected.
Obviously, I could rewrite UI tests with a Java-friendly component like Selenium, but it doesn't make sense to duplicate the effort.
Another solution is to run existing tests with an exec () call in Java, wait for a return, possibly syntax analysis and perform other actions / checks that need to be performed.
Embedding existing PHP code in Java does not seem to be a viable solution given how the projects were written.
. - ( ) , , /.
- - , ? , ?