Testcontainers for Real Integration Tests [...]
summary
Shows using Testcontainers 1.1.10.1 with an Elasticsearch 6.4.3 Docker image to run real integration tests: start an ElasticsearchContainer, getMappedPort(...) and use client.info() to find the endpoint, then perform index/create/index document/search assertions and tear down the container. Also demonstrates falling back to a local Elasticsearch or Elastic Cloud endpoint to avoid repeated slow container starts, reporting that tests run reliably and reduce flakiness.
AI-written summary · about
chapters (7)
- 0:00Elasticsearch integration tests
- 3:09Integration tests without containers
- 5:38Start Elasticsearch with Testcontainers
- 7:05Get Elasticsearch container address
- 9:35Optimize tests with local cluster
- 10:59Run tests on Elastic Cloud
- 13:57Conclusion
related talks
19mTestcontainers for real Elasticsearch integration tests
35mReal Integration Tests with TestContainers
47mIntegration Tests: testcontainers to the Rescue
48mContainers for Real Integration Tests
51mTestContainers: Integration Testing Without the Hassle
15mTestcontainers: Simplify Your Integration Tests and Development
50mMastering Integration Tests with Testcontainers.
26mRemoving Complexity from Integration Tests Using Testcontainers
