Java Maven Project Docker Integration Tests
We have a big multi module maven project, wich uses cargo to start a tomcat with some wars, a plugin to insert sql data in a postgres database and then using cucumber we run the integration test suit.
I was reading a lot about Docker, and I could play around with it. So here my question,
Can Docker replace my integration test that uses cargo?
What are the benefits?
What about the performance in comparison with the deploy using cargo?
Could a suite that starts containers with postgres and tomcat images improve the build time?
Hope someone can help me here cause I’m pretty exited about docker!
One Solution collect form web for “Java Maven Project Docker Integration Tests”
- Can Docker replace my integration test that uses cargo?
Yes Continuous Integration Using docker. This jetty container may come in handy.
- What about the performance in comparison with the deploy using cargo?
The performance will be about the same maybe a little slower to start up, depending on what you are doing in the docker container. Docker is more about isolation and repeatability rather than performance. Its way more performant than a virtual machine but not more than cargo on native host.
- Could a suite that starts containers with postgres and tomcat images improve the build time
Maybe, depends on what you are doing currently. You could create a known state in your docker container and if you were previously manually creating that state then you may find the build to be faster.
The real benifit of docker is that you can have a well known state in your postgress database and the tests always run against that known state. Further you do not have to have everyone in your team install postgress locally. The just need to install docker and then the rest will be automated. Please often use docker in conjunction with Vagrant so that even installing docker can scripted and automated.