Software Testing

Java and Python based test frameworks and libraries that support software integration testing with CrateDB.

Python pytest

The popular pytest framework makes it easy to write small tests, but it also supports complex functional testing for applications and libraries. The pytest-crate package manages CrateDB instances for running integration tests against them.

It is based on cr8 for the heavy lifting, and additionally provides the crate, crate_execute, and crate_cursor pytest fixtures for developer convenience.

Python unittest

cr8, a collection of tools for CrateDB developers, provides primitive elements to manage CrateDB single-node and multi-node instances through its run-crate subsystem, that can be used to create test layers for Python’s built-in unittest framework.

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.