Testcontainers for real integration tests with Elasticsearch

Played 1 times
Videos 1
First Sep 2018
Last Sep 2018
Testcontainers for real integration tests with Elasticsearch

Testcontainers for real integration tests with Elasticsearch

How are you testing with your database?

  • Mocking is not an option since you want to test the actual system.
  • In-memory databases, like H2 or HSQLDB, have subtle differences and not all datastores have in-memory cousins.
  • Managing and running tests in parallel against the actual datastore is a pain.

So what is the solution? There are some very neat solutions based on containers, namely the Docker-Maven-Plugin and Testcontainers. From your tests you can start a lightweight, throwaway instance of your datastore and this talk will walk you through how to do that.

And we will introduce the module we built for Elasticsearch: https://www.testcontainers.org/modules/elasticsearch/ .

Title

Testcontainers for real integration tests with Elasticsearch

Abstract

How are you testing with your database?

* Mocking is not an option since you want to test the actual system.
* In-memory databases, like H2 or HSQLDB, have subtle differences and not all datastores have in-memory cousins.
* Managing and running tests in parallel against the actual datastore is a pain.

So what is the solution? There are some very neat solutions based on containers, namely the Docker-Maven-Plugin and Testcontainers. From your tests you can start a lightweight, throwaway instance of your datastore and this talk will walk you through how to do that.

And we will introduce the module we built for Elasticsearch: https://www.testcontainers.org/modules/elasticsearch/.

Testcontainers pour de vrais tests d'intégration d'Elasticsearch

Les tests d’intégration peuvent devenir un cauchemar lorsqu’ils sont lancés depuis la même JVM que votre code:

  • Conflit de JARs (JAR Hell)
  • Security Manager
  • Effets de bord

De plus, tester avec un produit qui est lancé de façon différente de la façon dont il est lancé en production, ne garantira jamais que les tests d’intégration sont sincères.

Aussi, après avoir découvert le projet Testcontainers qui lance des conteneurs Docker, j’ai décidé d’écrire une implémentation pour Elasticsearch: testcontainers-java-module-elasticsearch . Je vous propose de découvrir tout cela pendant cette session.

Title

Testcontainers pour de vrais tests d'intégration d'Elasticsearch

Abstract

Les tests d'intégration peuvent devenir un cauchemar lorsqu'ils sont lancés depuis la même JVM que votre code:

* Conflit de JARs (JAR Hell)
* Security Manager
* Effets de bord

De plus, tester avec un produit qui est lancé de façon différente de la façon dont il est lancé en production, ne garantira jamais que les tests d'intégration sont sincères.

Aussi, après avoir découvert le projet [Testcontainers](https://www.testcontainers.org/) qui lance des conteneurs Docker, j'ai décidé d'écrire une implémentation pour Elasticsearch: [testcontainers-java-module-elasticsearch](https://www.testcontainers.org/modules/elasticsearch/).
Je vous propose de découvrir tout cela pendant cette session.

Resources

Useful resources related to this talk.

© 2010 - 2026 David Pilato

🔍 Search is powered by QueryBox. Just hit CTRL+K or CMD+K to start searching.

⚙️ Generated from 🇫🇷 with ❤️ on Wed Jan 28, 2026 at 08:39:28 UTC

🌱 Powered by Hugo with theme Dream and some custom templates.

Details

I discovered Elasticsearch project in 2011. After contributed to the project and created open source plugins for it, David joined elastic the company in 2013 where he is Developer and Evangelist. He also created and still actively managing the French spoken language User Group. At elastic, he mainly worked on Elasticsearch source code, specifically on open-source plugins. In his free time, he likes talking about elasticsearch in conferences or in companies (Brown Bag Lunches AKA BBLs ). He is also author of FSCrawler project which helps to index your pdf, open office, whatever documents in elasticsearch using Apache Tika behind the scene.

Who am I?

Developer | Evangelist at elastic and creator of the Elastic French User Group . Frequent speaker about all things Elastic, in conferences, for User Groups and in companies with BBL talks . In my free time, I enjoy coding and deejaying as DJ Elky , just for fun. Living with my children in Cergy, France.

Social Links