or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

tessl/maven-org-testcontainers--testcontainers-bom

Testcontainers BOM provides centralized dependency management for all Testcontainers modules in Java testing projects

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
mavenpkg:maven/org.testcontainers/testcontainers-bom@1.21.x

To install, run

npx @tessl/cli install tessl/maven-org-testcontainers--testcontainers-bom@1.21.0

index.mddocs/

Testcontainers BOM

Testcontainers BOM (Bill of Materials) provides centralized dependency management for the entire Testcontainers ecosystem in Java projects. It ensures consistent versions across all Testcontainers modules, eliminating version conflicts and simplifying dependency management in complex testing scenarios.

Package Information

  • Package Name: org.testcontainers:testcontainers-bom
  • Package Type: maven
  • Language: Java (Build Management)
  • Installation: Import as BOM in Maven or Gradle
  • Version: 1.21.3

Core Imports

Maven

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-bom</artifactId>
      <version>1.21.3</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

Gradle

dependencies {
    implementation platform('org.testcontainers:testcontainers-bom:1.21.3')
}

Basic Usage

<!-- After importing BOM in dependencyManagement -->
<dependencies>
  <!-- No version needed - managed by BOM -->
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>junit-jupiter</artifactId>
    <scope>test</scope>
  </dependency>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>postgresql</artifactId>
    <scope>test</scope>
  </dependency>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>kafka</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>
// After importing platform
dependencies {
    testImplementation 'org.testcontainers:junit-jupiter'
    testImplementation 'org.testcontainers:postgresql'
    testImplementation 'org.testcontainers:kafka'
}

Architecture

The Testcontainers BOM operates as a Maven/Gradle dependency management artifact that:

  • Version Centralization: Maintains consistent versions for 66 Testcontainers modules
  • Conflict Resolution: Prevents version mismatches between different Testcontainers components
  • Dynamic Generation: Build process automatically includes all published Testcontainers modules
  • Zero-Code Artifact: Contains no executable code, only dependency metadata

Capabilities

Maven Dependency Management

Provides Maven <dependencyManagement> integration for centralized version control.

<!-- BOM Import Pattern -->
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-bom</artifactId>
      <version>1.21.3</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<!-- Usage Pattern (version managed by BOM) -->
<dependency>
  <groupId>org.testcontainers</groupId>
  <artifactId>MODULE_NAME</artifactId>
  <scope>test</scope>
</dependency>

Gradle Platform Integration

Supports Gradle's platform mechanism for dependency management.

// Platform Import Pattern
dependencies {
    implementation platform('org.testcontainers:testcontainers-bom:1.21.3')
}

// Usage Pattern (version managed by platform)
dependencies {
    testImplementation 'org.testcontainers:MODULE_NAME'
}

Version Management

Manages versions for the complete Testcontainers module ecosystem.

Core Modules

<!-- Core Testcontainers functionality -->
<artifactId>testcontainers</artifactId>
<artifactId>junit-jupiter</artifactId>

Database Modules

<!-- Relational Databases -->
<artifactId>postgresql</artifactId>
<artifactId>mysql</artifactId>
<artifactId>mariadb</artifactId>
<artifactId>mssqlserver</artifactId>
<artifactId>oracle-xe</artifactId>
<artifactId>oracle-free</artifactId>
<artifactId>db2</artifactId>

<!-- NoSQL Databases -->
<artifactId>mongodb</artifactId>
<artifactId>cassandra</artifactId>
<artifactId>neo4j</artifactId>
<artifactId>couchbase</artifactId>
<artifactId>orientdb</artifactId>

<!-- Time Series and Analytics -->
<artifactId>influxdb</artifactId>
<artifactId>clickhouse</artifactId>
<artifactId>questdb</artifactId>
<artifactId>timeplus</artifactId>

<!-- Distributed Databases -->
<artifactId>cockroachdb</artifactId>
<artifactId>cratedb</artifactId>
<artifactId>scylladb</artifactId>
<artifactId>tidb</artifactId>
<artifactId>yugabytedb</artifactId>
<artifactId>oceanbase</artifactId>
<artifactId>databend</artifactId>

Message Queue Modules

<!-- Message Brokers -->
<artifactId>kafka</artifactId>
<artifactId>rabbitmq</artifactId>
<artifactId>pulsar</artifactId>
<artifactId>redpanda</artifactId>
<artifactId>activemq</artifactId>
<artifactId>hivemq</artifactId>
<artifactId>solace</artifactId>

Search and Analytics Modules

<!-- Search Engines -->
<artifactId>elasticsearch</artifactId>
<artifactId>solr</artifactId>
<artifactId>typesense</artifactId>

Cloud and Infrastructure Modules

<!-- Cloud Services -->
<artifactId>localstack</artifactId>
<artifactId>azure</artifactId>
<artifactId>gcloud</artifactId>

<!-- Infrastructure Services -->
<artifactId>vault</artifactId>
<artifactId>consul</artifactId>
<artifactId>nginx</artifactId>
<artifactId>grafana</artifactId>

Vector Databases and AI Modules

<!-- Vector Databases -->
<artifactId>chromadb</artifactId>
<artifactId>milvus</artifactId>
<artifactId>pinecone</artifactId>
<artifactId>qdrant</artifactId>
<artifactId>weaviate</artifactId>

<!-- AI Services -->
<artifactId>ollama</artifactId>
<artifactId>openfga</artifactId>

Testing and Development Modules

<!-- Browser Testing -->
<artifactId>selenium</artifactId>

<!-- Testing Utilities -->
<artifactId>mockserver</artifactId>
<artifactId>toxiproxy</artifactId>
<artifactId>k6</artifactId>

<!-- Framework Integrations -->
<artifactId>spock</artifactId>
<artifactId>jdbc</artifactId>
<artifactId>r2dbc</artifactId>
<artifactId>database-commons</artifactId>

Container Orchestration Modules

<!-- Kubernetes -->
<artifactId>k3s</artifactId>

Storage Modules

<!-- Object Storage -->
<artifactId>minio</artifactId>

<!-- Other Storage -->
<artifactId>dynalite</artifactId>

Directory and Authentication Modules

<!-- Authentication -->
<artifactId>ldap</artifactId>

SQL Engine Modules

<!-- SQL Engines -->
<artifactId>presto</artifactId>
<artifactId>trino</artifactId>

Conflict Resolution

Ensures version consistency across multiple Testcontainers dependencies.

<!-- Example: Multiple modules use consistent versions -->
<dependencies>
  <!-- All will use version 1.21.3 managed by BOM -->
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>testcontainers</artifactId>
    <scope>test</scope>
  </dependency>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>postgresql</artifactId>
    <scope>test</scope>
  </dependency>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>kafka</artifactId>
    <scope>test</scope>
  </dependency>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>selenium</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>

Usage Patterns

Integration Test Setup

<!-- pom.xml -->
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-bom</artifactId>
      <version>1.21.3</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>junit-jupiter</artifactId>
    <scope>test</scope>
  </dependency>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>postgresql</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>

Multi-Module Project

<!-- Parent pom.xml -->
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-bom</artifactId>
      <version>1.21.3</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<!-- Module A pom.xml -->
<dependencies>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>mysql</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>

<!-- Module B pom.xml -->
<dependencies>
  <dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>kafka</artifactId>
    <scope>test</scope>
  </dependency>
</dependencies>

Gradle Multi-Project

// build.gradle (root)
subprojects {
    dependencies {
        implementation platform('org.testcontainers:testcontainers-bom:1.21.3')
    }
}

// Module specific build.gradle files
dependencies {
    testImplementation 'org.testcontainers:junit-jupiter'
    testImplementation 'org.testcontainers:postgresql'
    testImplementation 'org.testcontainers:kafka'
}