Chapter 4. The Importance of Continuous Testing
“If you don’t like testing your product, most likely your customers won’t like testing it either.”
(Anonymous)
Testing is a core part of any continuous delivery build pipeline, and the introduction of Docker into the system technology stack has no impact in some areas of testing and a great impact in others. This chapter attempts to highlight these two cases, and makes recommendations for modifying an existing Java build pipeline to support the testing of containerized Java applications.
Functional Testing with Containers
The good news is that running Java applications within containers does not fundamentally affect functional testing. The bad news is that many systems being developed do not have an adequate level of functional testing regardless of the deployment technology.
The approach to unit and integration testing with Java applications that will ultimately be executed within containers remains unchanged. However, any component or system-level end-to-end tests should be run against applications running within containers in an environment as close to production as possible. In reality, placing an application inside a container can often make it easier to “spin up” and test, and the major area for concern is avoiding port and data clashes when testing concurrently.
Although it is not yet generally recommended to run production data stores from within containers, running RDBMS and other middleware within containers during the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access