Software testing¶
Testing Java applications against CrateDB.
JUnit¶
The popular JUnit framework is supported by CrateDB Java Testing Classes.
The package includes CrateTestServer and CrateTestCluster classes for use
as JUnit external resources. Both classes download and start CrateDB before
test execution, and stop CrateDB afterward.
- Package:
io.crate:crate-testing:0.12.1- Download:
io.crate:crate-testing (Maven Central)
- Repository:
- CI status:
This example project uses the io.crate:crate-testing package and includes a
corresponding project setup that you can use right away to get started.
Testcontainers¶
Testcontainers is an open-source framework for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container. CrateDB provides Testcontainers implementations for both Java and Python which are using its OCI container image.
- Package:
org.testcontainers:testcontainers-cratedb:2.0.1- Download:
org.testcontainers:testcontainers-cratedb (Maven Central)
- Repository:
- Documentation:
- CI status:
This example project uses the testcontainers-cratedb package and includes a
corresponding project setup that you can use right away to get started.