Official Module

neo4j
We partner with software vendors to maintain and certify official modules.

Community Module

These modules are maintained by the community, outside of the Testcontainers project.

Description

Neo4j is a highly scalable open source graph database management system.

Examples

Dependency:
<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>neo4j</artifactId>
    <version>1.20.0</version>
    <scope>test</scope>
</dependency>
Usage:
var neo4j = new Neo4jContainer<>(DockerImageName.parse("neo4j:4.4"));
neo4j.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/neo4j
Usage:
neo4jContainer, err := neo4j.Run(context.Background(),
  "neo4j:4.4",
  neo4j.WithAdminPassword("letmein!"),
  neo4j.WithLabsPlugin(neo4j.Apoc),
)
Dependency:
dotnet add package Testcontainers.Neo4j
Usage:
var neo4jContainer = new Neo4jBuilder()
  .WithImage("neo4j:5.4")
  .Build();
await neo4jContainer.StartAsync();
Dependency:
npm install @testcontainers/neo4j --save-dev
Usage:
const container = await new Neo4jContainer("neo4j:4.4.12").start();
Dependency:
pip install testcontainers[neo4j]
Usage:
with Neo4jContainer() as neo4j, neo4j.get_driver() as driver, driver.session() as session:
    result = session.run("MATCH (n) RETURN n LIMIT 1")
    record = result.single()
Dependency:
cargo add -F oracle --dev testcontainers-modules
Usage:
// On slower machines more time needed than 60 seconds may be required (see `with_startup_timeout`).
testcontainers_modules::oracle::free::Oracle::default().start()