<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testcontainers on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/category/testcontainers/</link><description>Recent content in Testcontainers on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 23 Apr 2026 09:08:08 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/category/testcontainers/index.xml" rel="self" type="application/rss+xml"/><item><title>Eliminating Flaky Tests to End World Hunger</title><link>https://foojayio.github.io/website/today/eliminating-flaky-tests-to-end-world-hunger/</link><pubDate>Thu, 23 Apr 2026 09:02:34 +0000</pubDate><guid>https://foojayio.github.io/website/today/eliminating-flaky-tests-to-end-world-hunger/</guid><description>&lt;p&gt;Rita Mae Brown once said:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Insanity&lt;/strong&gt; is doing the same thing over and over again and expecting different results.​&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;However, everyone has at least once experienced a test that failed and then passed in the next run without changing the code or the environment. In software engineering, we don&amp;rsquo;t call it insanity; we call such unpredictable failures &lt;strong&gt;flaky tests&lt;/strong&gt;. At first, they may seem like minor problems, but like clutter in a junk drawer, they become worse over time if you never take care of them.&lt;/p&gt;</description></item><item><title>Introducing Floci: A High-Performance, GraalVM-Powered AWS Emulator</title><link>https://foojayio.github.io/website/today/introducing-floci-a-high-performance-graalvm-powered-aws-emulator/</link><pubDate>Fri, 03 Apr 2026 19:00:53 +0000</pubDate><guid>https://foojayio.github.io/website/today/introducing-floci-a-high-performance-graalvm-powered-aws-emulator/</guid><description>&lt;h2 id="h2-0-the-motivation-why-another-aws-emulator"&gt;The Motivation: Why Another AWS Emulator?&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://foojayio.github.io/website/today/introducing-floci-a-high-performance-graalvm-powered-aws-emulator/perf-chart-light-700x394.png" alt="" loading="lazy"&gt;
&lt;/p&gt;
&lt;br /&gt;
&lt;p&gt;As Java developers, we are used to local-first development. Tools that emulate the cloud environment have become essential for keeping feedback loops tight and costs at zero. However, the ecosystem has shifted. Many of us have felt the friction of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mandatory Authentication: Needing to log in or use tokens just to run local tests.&lt;/li&gt;
&lt;li&gt;Heavy Resource Footprint: Docker containers that consume a lot of resources.&lt;/li&gt;
&lt;li&gt;Slow Startup: Waiting several seconds for the environment to be &lt;strong&gt;ready.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I created Floci (from the floccus cloud formation) to solve these specific pain points. It is a 100% open-source, MIT-licensed alternative designed for speed, privacy, and simplicity.&lt;/p&gt;</description></item><item><title>Testing Emails with Testcontainers and Mailpit</title><link>https://foojayio.github.io/website/today/testing-emails-with-testcontainers-and-mailpit/</link><pubDate>Thu, 29 Jan 2026 08:38:10 +0000</pubDate><guid>https://foojayio.github.io/website/today/testing-emails-with-testcontainers-and-mailpit/</guid><description>&lt;p&gt;Testing email functionality is often painful. SMTP servers are external, tests become slow or flaky, and local setups differ from CI environments. As a result, many teams either mock the mail sender or skip proper email tests completely.&lt;/p&gt;
&lt;p&gt;Both approaches are unsatisfying. Mocking does not test real behavior, and shared SMTP servers introduce hidden dependencies. What we really want is a real SMTP server that runs locally and in CI, is fully isolated per test run, and allows us to inspect sent emails easily.&lt;/p&gt;</description></item><item><title>Testing MongoDB Atlas Search Java Apps Using TestContainers</title><link>https://foojayio.github.io/website/today/testing-mongodb-atlas-search-java-apps-using-testcontainers/</link><pubDate>Thu, 29 May 2025 18:07:27 +0000</pubDate><guid>https://foojayio.github.io/website/today/testing-mongodb-atlas-search-java-apps-using-testcontainers/</guid><description>&lt;p&gt;This will be an exploration of testing MongoDB Atlas Search solutions written in Java using TestContainers and JUnit5. We&amp;rsquo;ll start simple and build up to more advanced uses which load seed data and provide an environment for consistent and easy to maintain tests.&lt;/p&gt;
&lt;p&gt;TLDR; if (like me!) you want to get straight to the code rather than reading lots of tedious words:&lt;/p&gt;
&lt;pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""&gt;git clone https://github.com/luketn/mongodb-atlas-local-testcontainers.git
cd mongodb-atlas-local-testcontainers
mvn test&lt;/pre&gt;
&lt;h2 id="h2-0-what-is-mongodb-atlas-search-anyway"&gt;What is MongoDB Atlas Search, anyway?&lt;/h2&gt;
&lt;p&gt;MongoDB Atlas Search is an extension to the built-in indexing capabilities that are part of MongoDB itself, using the awesome open source indexing and query library &lt;a href="https://lucene.apache.org/" target="_blank" rel="noopener noreferrer"&gt;Lucene&lt;/a&gt;
. MongoDB has built a wrapper around Lucene called &lt;a href="https://www.mongodb.com/docs/atlas/atlas-search/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=Testing&amp;#43;MongoDB&amp;#43;Atlas&amp;#43;Search&amp;#43;Java&amp;#43;Apps&amp;#43;Using&amp;#43;TestContainers&amp;amp;utm_term=megan.grant#fts-architecture/" target="_blank" rel="noopener noreferrer"&gt;mongot&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Build local LLM applications with Quarkus, Ollama, Testcontainers</title><link>https://foojayio.github.io/website/today/building-local-llm-ai-powered-applications-with-quarkus-ollama-and-testcontainers/</link><pubDate>Thu, 27 Feb 2025 10:13:19 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-local-llm-ai-powered-applications-with-quarkus-ollama-and-testcontainers/</guid><description>&lt;p&gt;Traditionally, many AI-powered applications rely on cloud-based APIs or centralized services for model hosting and execution. While this approach has its advantages, such as scalability and ease of use, it also introduces challenges around latency, data privacy, and dependency on third-party providers.&lt;/p&gt;
&lt;p&gt;This is where local AI models shine. By running models directly within your application&amp;rsquo;s infrastructure, you gain greater control over performance, data security, and deployment flexibility. However, building such systems requires the right tools and frameworks to bridge the gap between traditional software development and AI model integration.&lt;/p&gt;</description></item><item><title>Run true-to-production tests on your Java applications</title><link>https://foojayio.github.io/website/today/true-to-production-testing-java-apps/</link><pubDate>Tue, 24 Sep 2024 11:48:46 +0000</pubDate><guid>https://foojayio.github.io/website/today/true-to-production-testing-java-apps/</guid><description>&lt;p&gt;As supported by the &lt;a href="https://foojayio.github.io/website/today/creating-cloud-native-java-applications-with-the-12-factor-app-methodology/" title="12 factor"&gt;12 factor&lt;/a&gt;
 and &lt;a href="https://developer.ibm.com/articles/creating-a-12-factor-application-with-open-liberty/" title="15 factor app" target="_blank" rel="noopener noreferrer"&gt;15 factor app&lt;/a&gt;
 methodologies, in application development, we&amp;rsquo;ve come to realize just how important it is to test our applications in a true-to-production environment before releasing them to consumers. This helps us to mitigate potential failures and spot bugs that could appear in production but be missed in testing due to environmental differences and ensure we have high confidence in our applications being deployed to production environments. But, traditionally, developers have struggled with replicating an application&amp;rsquo;s production environment locally.&lt;/p&gt;</description></item><item><title>Foojay Podcast #52 from JCON in Cologne!</title><link>https://foojayio.github.io/website/today/foojay-podcast-52/</link><pubDate>Mon, 10 Jun 2024 09:32:12 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-podcast-52/</guid><description>&lt;p&gt;This is part 4 of the JCON interviews!&lt;/p&gt;
&lt;p&gt;In this episode, we have 5 new guests for you.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We start with garbage collectors and Intelligence Cloud, a tool created by Azul to find out which of your code is actually used in production and which dependencies are known to have vulnerabilities. My colleague Gerrit Grunwald was at JCON to give a talk about these subjects.&lt;/li&gt;
&lt;li&gt;With Balkrishna Rawool we dove into Virtual Threads, a very interesting topic as concurrency and threads can be challenging&amp;hellip;&lt;/li&gt;
&lt;li&gt;Piotr Przybyl came to JCON to give a talk about Test Containers and how to test your application in an environment that is similar to your production environment. Another important topic related to testing is Flaky Tests. How do you handle tests that only fail from time to time and make your whole test report unreliable?&lt;/li&gt;
&lt;li&gt;François Martin had a talk about this subject, and he came to the conference together with Annelore Egger, who was one of the many volunteers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="h2-0-video"&gt;Video&lt;/h2&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/9q7kSibmVBA?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;

&lt;h2 id="h2-1-podcast-apps"&gt;Podcast Apps&lt;/h2&gt;
&lt;p&gt;You can listen and subscribe to the Foojay Podcast on:&lt;/p&gt;</description></item><item><title>Foojay Podcast #43: Modern Java Testing</title><link>https://foojayio.github.io/website/today/foojay-podcast-43/</link><pubDate>Mon, 26 Feb 2024 08:03:08 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-podcast-43/</guid><description>&lt;p&gt;As developers, we all want to write bug free and high quality code. Writing tests is a crucial part to achieve this.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s explore the art of ensuring robust and bug-free code in the Java ecosystem.&lt;/p&gt;
&lt;p&gt;Whether you&amp;rsquo;re a seasoned developer or just starting out, there&amp;rsquo;s a lot you can learn from the experts in this podcast about testing methodologies, tools, and best practices, empowering you to write reliable Java applications.&lt;/p&gt;</description></item><item><title>Video: Spring Boot Testcontainers Support for Local Development</title><link>https://foojayio.github.io/website/today/video-spring-boot-testcontainers-support-for-local-development/</link><pubDate>Fri, 16 Feb 2024 09:07:33 +0000</pubDate><guid>https://foojayio.github.io/website/today/video-spring-boot-testcontainers-support-for-local-development/</guid><description>&lt;p&gt;Spring Boot has supported TestsContainers for running services during tests for quite a while.&lt;/p&gt;
&lt;p&gt;With Spring Boot 3.1, Testcontainers support for local development was added. This video will show you how this works and how to use it.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/GoBm7BoufIM?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;</description></item><item><title>Foojay Podcast #38: Java in the Cloud</title><link>https://foojayio.github.io/website/today/foojay-podcast-38/</link><pubDate>Mon, 25 Dec 2023 12:02:46 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-podcast-38/</guid><description>&lt;p&gt;Java was born in 1995, when the internet as we know it today didn&amp;rsquo;t exist yet.&lt;/p&gt;
&lt;p&gt;Cloud servers, Docker, Kubernetes, distributed systems, scaling up and down&amp;hellip; these things are now part of our daily job, but Java wasn&amp;rsquo;t originally designed for it.&lt;/p&gt;
&lt;p&gt;In this episode, we want to learn if the recent evolutions in OpenJDK, and ongoing related projects, will make Java a full Cloud member.&lt;/p&gt;
&lt;h2 id="h2-0-video"&gt;Video&lt;/h2&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/xU4rKnzkSpo?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;

&lt;h2 id="h2-1-podcast-apps"&gt;Podcast Apps&lt;/h2&gt;
&lt;p&gt;You can listen and subscribe to the Foojay Podcast on:&lt;/p&gt;</description></item><item><title>Testing Spring Boot JMS with ActiveMQ Artemis and Testcontainers</title><link>https://foojayio.github.io/website/today/testing-spring-boot-jms-with-activemq-artemis-and-testcontainers/</link><pubDate>Tue, 12 Dec 2023 07:55:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/testing-spring-boot-jms-with-activemq-artemis-and-testcontainers/</guid><description>&lt;p&gt;&lt;strong&gt;Currently, I&amp;rsquo;m teaching JMS with Spring Boot at the University of Applied Science in Bern, Switzerland. We use &lt;a href="https://activemq.apache.org/components/artemis/" target="_blank" rel="noopener noreferrer"&gt;Apache ActiveMQ Artemis&lt;/a&gt;
 as the JMS message broker. But how can we test our Spring Boot application?&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="h2-0-testcontainers-to-the-rescue"&gt;Testcontainers to the Rescue&lt;/h2&gt;
&lt;p&gt;Currently, there is no &lt;a href="https://java.testcontainers.org%24/" target="_blank" rel="noopener noreferrer"&gt;Testcontainers Java&lt;/a&gt;
 module for ActiveMQ Artemis. As you can see in the &lt;a href="https://github.com/testcontainers/testcontainers-java" target="_blank" rel="noopener noreferrer"&gt;Testcontainers GitHub repository&lt;/a&gt;
, there is an active activemq branch that may be released soon. But in the meantime, we need another solution.&lt;/p&gt;</description></item><item><title>Spring's new JdbcClient API for performing database operations</title><link>https://foojayio.github.io/website/today/the-new-jdbcclient-introduced-in-spring-framework-6-1/</link><pubDate>Fri, 08 Sep 2023 06:45:44 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-new-jdbcclient-introduced-in-spring-framework-6-1/</guid><description>&lt;p&gt;&lt;strong&gt;Spring framework 6.1 introduced a new JdbcClient API, which is a wrapper on top of JdbcTemplate, for performing database operations using a fluent API.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Spring Boot 3.2 is going to include Spring framework 6.1, so let&amp;rsquo;s take a quick look at&lt;/p&gt;
&lt;p&gt;how we can use &lt;strong&gt;JdbcClient&lt;/strong&gt; to implement various database operations in a simplified manner.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s go to &lt;a href="https://start.spring.io/" target="_blank" rel="noopener noreferrer"&gt;https://start.spring.io/&lt;/a&gt;
 and create a Spring Boot application by selecting&lt;br&gt;
&lt;strong&gt;Spring JDBC&lt;/strong&gt; , &lt;strong&gt;PostgreSQL Driver&lt;/strong&gt; , &lt;strong&gt;Flyway Migration&lt;/strong&gt; , and &lt;strong&gt;Testcontainers&lt;/strong&gt; starters.&lt;/p&gt;</description></item><item><title>Spring Boot: local development enhancements, let's compose!</title><link>https://foojayio.github.io/website/today/spring-boot-local-development-enhancements-lets-compose/</link><pubDate>Fri, 25 Aug 2023 11:16:05 +0000</pubDate><guid>https://foojayio.github.io/website/today/spring-boot-local-development-enhancements-lets-compose/</guid><description>&lt;p&gt;Quite often when we are developing an application we need external services such as rabbitMQ, Kafka, etc.&lt;/p&gt;
&lt;p&gt;When you are developing locally, you are quite likely using a docker-compose file to start these up, and I am certainly (hopefully) not the only one that has forgotten at least once to start these instances up.&lt;/p&gt;
&lt;p&gt;And maybe you are even already using Testcontainers for your testing.&lt;/p&gt;
&lt;p&gt;Luckily, Spring Boot 3.1 introduced some nice improvements to make our lives a bit easier.&lt;/p&gt;</description></item><item><title>Local Development Made Simpler with Testcontainers Desktop app</title><link>https://foojayio.github.io/website/today/testing-and-local-development-made-simpler-with-testcontainers-desktop-app/</link><pubDate>Mon, 21 Aug 2023 07:52:45 +0000</pubDate><guid>https://foojayio.github.io/website/today/testing-and-local-development-made-simpler-with-testcontainers-desktop-app/</guid><description>&lt;p&gt;&lt;strong&gt;Being able to release new features quickly is a must-have capability in today&amp;rsquo;s competitive world. In order to release your software quickly and often you should have CI/CD infrastructure that can automatically build, test, and release our software with minimal to no human intervention. A comprehensive automated test suite is the key to release your software with confidence.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://testcontainers.com" target="_blank" rel="noopener noreferrer"&gt;Testcontainers&lt;/a&gt;
 libraries help you to write integration tests using the real dependencies with the ease of writing unit tests. Let us take a quick look at how Testcontainers enables you to write tests that give confidence in your software.&lt;/p&gt;</description></item><item><title>Faster Integration Tests with Reusable Testcontainers</title><link>https://foojayio.github.io/website/today/faster-integration-tests-with-reusable-testcontainers/</link><pubDate>Wed, 17 Aug 2022 11:05:05 +0000</pubDate><guid>https://foojayio.github.io/website/today/faster-integration-tests-with-reusable-testcontainers/</guid><description>&lt;p&gt;In my job, I often need integration tests against a &lt;a href="https://neo4j.com" target="_blank" rel="noopener noreferrer"&gt;Neo4j&lt;/a&gt;
 database. My software is written in Java, and so is Neo4j. Neo4j is embeddable, too. So, in theory, I could just depend on the embedded version, open a connection, test my stuff and call it a day. It would not be a different engine, it would be - at least from a query-engine and planer perspective - the same thing, in contrast to using an embedded SQL database as a drop-in for PostgresQL for example.&lt;/p&gt;</description></item><item><title>Easy Jakarta EE Integration Testing</title><link>https://foojayio.github.io/website/today/easy-jakarta-ee-integration-testing/</link><pubDate>Wed, 04 May 2022 14:41:49 +0000</pubDate><guid>https://foojayio.github.io/website/today/easy-jakarta-ee-integration-testing/</guid><description>&lt;p&gt;One major issue when developing modern enterprise applications is the &amp;ldquo;works on my machine&amp;rdquo; problem: when an application works well on your machine but is not functional in production or even on a colleague&amp;rsquo;s machine.&lt;/p&gt;
&lt;p&gt;An even more prevalent problem is to maintain the quality of ever-changing applications during development and maintenance.&lt;/p&gt;
&lt;p&gt;This is especially prevalent when Jakarta EE applications are developed and not properly tested in an isolated and cohesive manner.&lt;/p&gt;</description></item></channel></rss>