Integration testing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Integration testing

Hello Christoph,

As you mentioned here there are different ways to start the environment (but you are making use plugins made for web-servers).

I have a multi module project, which contains 2 spring-boot application and one stand alone application without spring (Just a java class with main method).

What is the best way to start up these 2 spring-boot application and the stand alone application in the pre-integration-test phase?

- parent
-- module1 (spring-boot)
-- module2 (spring-boot)
-- module3 (stand alone)
-- module4 (citrus project with test cases)

I would like to start modules 1 to 3 (in the pre-integration step) before citrus run the integration test (in separate jvm). After the integration step is done I would like to stop all the jvm, started in pre-integration-step.
I'm still unable to setup a good way to do that.

Note module3 would start a server application where the module1 and module2 would try to connect to, so there is a kind of order in which the processes should be started.

I think I need to do something in the pom.xml of the module4 (citrus) to start up the environment, and module 1 to 3 would be left without any info about integration testing right?

Reply | Threaded
Open this post in threaded view

Re: Integration testing

Christoph Deppisch
The bakery sample in citrus-samples repository is a good example for you. The bakery sample starts workers as plain Java main processes using Maven exec-maven-plugin in pre-integration-test phase.

Have a look at the details in sample-bakery/integration/pom.xml where the profile workers-embeddedstarts several Java main classes as standalone applications using exec script execution. The start/stop scripts can be reused for your project, too

Also consider to use Docker as a complete alternative infrastructure setup. The Docker way of starting multiple containers with different standalone applications in pre-integration-test phase is also used in the bakery sample. The sample uses the docker-maven-plugin to start/stop the complete infrastructure. Have a look at the configuration in