Software Testing¶
Test frameworks and libraries that support software integration testing with CrateDB.
Java¶
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-cratedb 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.
Testcontainers provides CrateDB modules for Java, Python, and Rust.
Python¶
The CrateDB module of Testcontainers for Python starts a single-node CrateDB, and provides a connection URL for the SQLAlchemy dialect.
- Package:
testcontainers[cratedb], version 4.15.0 or later- Repository:
- CI status:
Rust¶
The CrateDB module of Testcontainers for Rust is part of its community modules.
- Package:
testcontainers-modules, with thecratedbfeature- Documentation: