-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing: Add page about software testing with CrateDB (Java and Python)
- native: Python unittest, using cr8 - native: pytest-crate, using cr8 - testcontainers: Testcontainers for Java - testcontainers: Testcontainers for Python (pytest and unittest)
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
(testing)= | ||
# Software Testing with CrateDB | ||
|
||
This documentation section lists Java- and Python-based test frameworks | ||
and libraries that support software integration testing with CrateDB. | ||
|
||
|
||
(python-pytest)= | ||
## Python pytest | ||
|
||
The popular [pytest] framework makes it easy to write small tests, yet | ||
scales to support 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](#cr8), and provides the `crate`, | ||
`crate_execute`, and `crate_cursor` pytest fixtures on top. | ||
|
||
- [Using "pytest-crate" with CrateDB and pytest] | ||
|
||
|
||
(cr8)= | ||
(python-unittest)= | ||
## Python unittest | ||
|
||
[cr8], a collection of tools for CrateDB developers, provides primitives 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. | ||
|
||
- [Using "cr8" test layers with CrateDB and unittest] | ||
|
||
|
||
(testcontainers)= | ||
## 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. | ||
|
||
- [Using "Testcontainers for Java" with CrateDB] | ||
- [Using "Testcontainers for Python" with CrateDB and pytest] | ||
- [Using "Testcontainers for Python" with CrateDB and unittest] | ||
|
||
|
||
[cr8]: https://pypi.org/project/cr8/ | ||
[pytest]: https://docs.pytest.org/ | ||
[pytest-crate]: https://pypi.org/project/pytest-crate/ | ||
[run-crate]: https://pypi.org/project/cr8/#run-crate | ||
[Testcontainers]: https://testcontainers.com/ | ||
[unittest]: https://docs.python.org/3/library/unittest.html | ||
[Using "cr8" test layers with CrateDB and unittest]: https://github.com/crate/cratedb-examples/tree/main/testing/native/python-unittest | ||
[Using "pytest-crate" with CrateDB and pytest]: https://github.com/crate/cratedb-examples/tree/main/testing/native/python-pytest | ||
[Using "Testcontainers for Java" with CrateDB]: https://github.com/crate/cratedb-examples/tree/main/testing/testcontainers/java | ||
[Using "Testcontainers for Python" with CrateDB and pytest]: https://github.com/crate/cratedb-examples/tree/main/testing/testcontainers/python-pytest | ||
[Using "Testcontainers for Python" with CrateDB and unittest]: https://github.com/crate/cratedb-examples/tree/main/testing/testcontainers/python-unittest |