2016-02-07

Testcontainers 1.0.0 release

I’ve just released v1.0.0 of Testcontainers, the little library for using Docker containers in JUnit tests. It’s been great to get feedback and contributions from others - and especially awesome to hear kind words about it along the way.

This latest release brings some small tweaks and improvements throughout, as well as one fairly significant internal change.

If you’re not familiar with what Testcontainers is, please check out these posts to find out more:

Shading Jersey and Jackson dependencies

One frustratingly hard aspect of releasing a library that (transitively) depends on Jersey and Jackson is the potential for version conflicts this foists upon users. I’ve experienced this myself using Testcontainers at $WORK, and reports from other users have confirmed my fear that this is something that needs to be fixed.

Stopping short of creating a brand new Docker client implementation that did not use Jersey or Jackson, I’ve instead used Maven Shade to bundle these into the core library. Due to the extent to which Jersey uses Java ServiceLoaders this was actually quite a fiddly task, requiring both inclusion and relocating of relevant classes and service loader manifests.

Now that it’s done, it (hopefully) means Jersey and Jackson version conflicts are a thing of the past, but if problems persist perhaps a more drastic course of action will be in order for a future release

Clearer logging around discovery of Docker environment

Previously there was little documentation or useful logging describing how Testcontainers actually discovers the Docker daemon. This is now hopefully clearer and more obvious, and won’t push users into having to read the code to find out 😬.

Feedback?

I’m really excited to release this next small increment, and hope it will serve as a useful tool for other developers!

If you have any issues or feedback, please let me know, either in a Github issue or by email!


testcontainers testing docker java


Previous post
Better JUnit Selenium testing with Docker and Testcontainers This is the third article in a series (1, 2) that explores integrated JUnit testing involving external components, supported by Testcontainers. This
Next post
Fish shell design principles These design principles are a good read. Not necessarily directly applicable to most types of software, but the spirit and direction of thought is