Skip to content

Testcontainers Overview

The corda-testacles-testcontainers module helps Cordapp developers launch container-based Corda networks for Integration Testing. The module is based on Testcontainers and uses Docker containers behind the scenes.

Installation

  1. Make sure you meet Testcontainers’ Prerequisites
  2. Add the module dependency to your Gradle build:
dependencies {
    //...
    // Add Corda Testacles Testcontainers 
    testImplementation("com.github.manosbatsis.corda.testacles:corda-testacles-testcontainers:$testacles_version")
    // Postgres  driver, if needed and not in the main classpath
    testImplementation("org.postgresql:postgresql:42.2.18")
    // Add JUnit etc.
}

Requirements

  • You need at least Docker server version 1.6.0 installed
  • For Corda 4.6+, the created container entrypoints will initialize
    the node with run-migration-scripts, so your cordapp must include database migration scripts.