Reputation: 188
I have a question regarding using docker for testing.
Our main solution is a client/server solution. However, the same server is also being used by our web applications. We know that our web applications, server and SQL Database can run in docker container, as it is today.
All our customers are currently running our web applications and server on either physical servers, or virtual machines.
From my knowledge that is obtained from the docker website, docker courses and the following stackoverflow post, there is a difference between a Virtual Machine and a Docker container.
But could there be such a big difference that our automated testing would have a different output or unable to catch errors in a docker container compared to a virtual machine?
From my understanding the main difference is that containers runs on host os, and VM's runs on its own instance of a OS. So, from my view the difference is not big enough to change the output of our testing in anyway?
Setup
Our container setup would be the exact same as it is in our VM testing environment
Upvotes: 0
Views: 1135
Reputation: 29639
It all depends.
The first question is one of provisioning - you'll need to create the Docker images, install the dependencies, manage configuration settings etc. If that provisioning process is different to the way you provision VMs, it's possible that when you test on Docker, you'll not get the same results as on VMs (or indeed the target production environment). This is especially important for non-functional testing like load and performance testing. It could also affect functional testing, e.g. when configuring database code pages etc.
The second question is whether your applications rely on any operating system features, or display extreme resource requirements. For instance, if your database absolutely must have a certain amount of memory, or your application server needs a custom configuration for network timeouts, this may be hard to reflect on Docker containers.
Upvotes: 0
Reputation: 44960
The differences between VM and container is usually visible from the management perspective e.g. different resource requirements or security concerns. From the client perspective there should be no difference. If the aplication uses well defined network interfaces e.g. Java has JDBC for communicating with the database the change from VM to container should be transparent, just like switching from one VM to another VM.
If the automated testing has different outcome on VM and container it means that either the application depends on something specific in the VM or there is an issue with the test suite. One way or another it should be debugged.
Upvotes: 2