Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Add page about software testing with CrateDB (Java and Python) #80

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,16 @@ Analyze information in your CrateDB cluster.
:link: ml
:link-type: ref

Integrations with machine learning frameworks.
Adapters and integrations with machine learning frameworks.
:::


:::{grid-item-card} {material-outlined}`integration_instructions;2em` Software Testing
:link: testing
:link-type: ref

Test frameworks and libraries that support software integration testing with
CrateDB.
:::


Expand Down Expand Up @@ -179,6 +188,7 @@ System Metrics <integrate/metrics>
Data Visualization <integrate/visualize>
Business Intelligence <integrate/bi>
Machine Learning <integrate/ml>
Software Testing <integrate/testing>
```

```{toctree}
Expand Down
59 changes: 59 additions & 0 deletions docs/integrate/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
(testing)=
# Software Testing with CrateDB

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, 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](#cr8) for the heavy lifting, and additionally provides
the `crate`, `crate_execute`, and `crate_cursor` pytest fixtures for
developer convenience.

- [Using "pytest-crate" with CrateDB and pytest]


(cr8)=
(python-unittest)=
## 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.

- [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
Loading