Software containers stalwart Docker, Inc. has acquired AtomicJar, a company known for its status and stewardship of the open source project Testcontainers. If it were not immediately obvious from the name, Testcontainers is focused on testing containers, container testing and testing with containers. As we know, containers are the now widely embraced technique for compartmentalising elements of software stack functionality into one singular modular block with all the software engineering components needed to be able to execute at application runtime in different environments. So why has testing been a challenge and how does this acquisition hope to address the difficulties faced by software developers in this space?
As Docker itself reminds us, “A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.”
Why is container testing tough?
Faced with the question, why is container testing so tough? The most likely answer is that a) nobody talks about it, mainly because people focus on the use of containers to create test environments b) containerisation itself is viewed as a route to making testing in Continuous Delivery (CD) environments easier as it packages up multiple services with associated dependencies that is perhaps ‘assumed’ to be suitable for deployment and c) the testing of dependencies inside and outside of container environments is (arguably) seen as a separate discipline that is either pre-baked in a finalised container… or the work of some external testing department.
Testcontainers aims to address the need to create mocks or complicated environment configurations in container testing. The technology’s core competency comes down to its ability to test application dependencies as code, then ‘simply’ run tests and find that containers will be created and then deleted. So in effect here, Testcontainers doesn’t necessarily test container efficacy in the first instance, it uses Docker containerisation technology to engineer what are said to be more ‘real world’ testing environments. How? By creating container tests that tap into live production technology streams such as databases, data warehouse services or networking channels such as message brokers etc.
Put into working motion, Testcontainers can means teams can use a containerised instance of a database to test the data access layer code for complete compatibility, without requiring a complex setup on developer machines. Teams can also work with this technology to use containerized web browsers, compatible with Selenium, to run automated User Interface (UI) tests – and, additionally, each test gets a clean instance of the browser, meaning the developer does not have to worry about variations in plugins or required updates.
Docker says it knows that the testing community is on a quest to make testing faster, smarter and more embedded in CD pipelines. While there was a period when testing projects could be elaborate and drawn out over days, often now, testers have only hours and minutes to test new software batches.
Automation and parallelisation
In extremely fast-paced development environments, a lack of time and limited resources eventuates into bottlenecks. The company says that automation and parallelisation are being now being used to solve this problem. Docker allows software engineering teams to spin up different containers with a local laptop or cloud service, making concurrency at a level of ‘a hundred of parallel machines’ possible. The Docker team also point out that their technology changes the way testing fits into the CI/CD pipeline by enabling a multi-container strategy, which is hoped to reduce and solve bottlenecks.
“With its support for Java, .NET, Node.js, and other programming languages together with its container-based testing automation, Testcontainers has become the de facto standard test framework for the developer’s ‘inner loop’,” said Docker CEO Scott Johnston. “Why? The result speaks for itself – Testcontainers provides a step-function improvement in both the quality and speed of application delivery. We’re excited to add their strong, complementary offering to the Docker portfolio.”
Testcontainers is an open source framework for provisioning throwaway, on-demand instances of containers for development and testing use cases. The project aims to make it easy to work with databases, message brokers, web browsers, or almost anything that can run in a Docker container. In 2022, Testcontainers saw an increase from 50 million to 100 million in Docker Hub pulls, making it one of the fastest growing open source projects in the testing category.
Shipping solid software
“Docker shares our goal of continuously improving the developer experience so that they can be more focused on innovating,” said Sergei Egorov, Testcontainers co-creator and CEO, AtomicJar. “We are excited to join Docker and are confident that our combination will vastly improve developer productivity while shipping software with confidence.”
AtomicJar is both the custodian of the Testcontainers OSS and has also delivered solutions for Testcontainers developers including Testcontainers Desktop – a companion application that enhances local development and testing; and Testcontainers Cloud – a cloud-based service that offloads the running of containers to the cloud, providing a consistent testing experience across different operating systems, enhancing developer productivity and team efficiency.
Free image use: Wikimedia Commons