nebula-contrib / testcontainers-nebula   0.1.2

Apache License 2.0 GitHub

Testcontainers for NebulaGraph, support Java 8+, Scala 3, Scala 2.13 and Scala 2.12

Scala versions: 3.x 2.13 2.12

Testcontainers for NebulaGraph

CI Nexus (Snapshots) Sonatype Nexus (Releases)

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

NebulaGraph is a popular open-source graph database that can handle large volumes of data with milliseconds of latency, scale up quickly, and have the ability to perform fast graph analytics. NebulaGraph has been widely used for social media, recommendation systems, knowledge graphs, security, capital flows, AI, etc.


Support Java 8+, Scala 3, Scala 2.13 and Scala 2.12


"io.github.jxnu-liguobin" %% "testcontainers-nebula" % 'latest version' % Test


    <version>'latest version'</version>


testImplementation group: 'io.github.jxnu-liguobin', name: 'testcontainers-nebula_2.13', version: 'latest version'

Usage Instructions

Java example: SimpleNebulaCluster

ZIO example: NebulaSpec

The zio module provides default configurations for better integration with zio-nebula, just adding dependency:

"io.github.jxnu-liguobin" %% "testcontainers-nebula-zio" % 'latest version'
// testcontainers-nebula-zio depends on zio-nebula dependency 
"io.github.jxnu-liguobin" %% "zio-nebula" % 'latest version'


  1. NebulaSimpleClusterContainer.scala creates four container instances: graphd,metad,storaged,console.
  2. NebulaClusterContainer.scala provides a generic definition, and any number of clusters can be created by implementing its abstraction methods, ports and volumes can be modified.