You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: pytest-backend/README.md
+79-21Lines changed: 79 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# pytest-exasol-backend Plugin
2
2
3
-
The `pytest-exasol-backend` plugin is a collection of pytest fixtures commonly used for testing
4
-
projects related to Exasol. In particular, it provides unified access to both Exasol On-Prem and
5
-
SaaS backends. This eliminates the need to build different sets of tests for different backends.
3
+
The pytest plugin `pytest-exasol-backend` provides pytest fixtures for using various Exasol database instances in integration tests.
4
+
5
+
In particular, the plugin enables accessing both Exasol On-Prem and SaaS backends in a unified way.
6
+
7
+
This enables your integration tests to use either backend variant without modification, incl. iterating the test for each backend variant.
6
8
7
9
## Features
8
10
@@ -19,10 +21,32 @@ The pytest-exasol-backend plugin can be installed using pip:
19
21
pip install pytest-exasol-backend
20
22
```
21
23
24
+
Alternatively via poetry, recommended as `dev` dependency:
25
+
26
+
```shell
27
+
poetry add pytest-exasol-backend --group dev
28
+
```
29
+
22
30
## Usage in Tests
23
31
24
-
Below is an example of a test that requires access to the database. Note, that by default
25
-
this test will run twice - once for each backend.
32
+
### PyExasol Connection
33
+
34
+
This test accesses the database via [PyExasol](github.com/exasol/pyexasol) and requires an additional (`dev`) dependency to `pyexasol` to be added to your project.
35
+
36
+
Note: If the pytest option `--backend all` is specified, then this test will run **twice** - once for each backend.
Here is an example of a test that requires access to the BucketFS. Again, this test will
37
-
run for each backend, unless one of them is disabled in the CLI.
60
+
### BucketFS
61
+
62
+
This test accesses the [BucketFS](https://docs.exasol.com/db/latest/database_concepts/bucketfs/bucketfs.htm). Again, this test will run for each backend, unless one of them is disabled in the CLI.
More parameters may be required if your setup deviates from the default values:
136
+
137
+
| Option | Default value |
138
+
|-----------------------|------------------|
139
+
|`--exasol-host`|`localhost`|
140
+
|`--exasol-port`|`8563`|
141
+
|`--exasol-username`|`sys`|
142
+
|`--exasol-password`|`exasol`|
143
+
|`--bucketfs-url`|`127.0.0.1:2580`|
144
+
|`--bucketfs-username`|`w`|
145
+
|`--bucketfs-password`| (none) |
88
146
89
-
## Setting ITDE parameters in CLI
147
+
###Setting ITDE Parameters via CLI Options
90
148
91
-
Sometimes the default ITDE parameters cannot satisfy the test requirements. The plugin allows setting
149
+
Sometimes, the default ITDE parameters cannot satisfy the test requirements. The plugin allows setting
92
150
some of the parameters of the [api.spawn_test_environment(...)](https://github.com/exasol/integration-test-docker-environment/blob/92cc67b8f9ab78c52106c1c4ba19fe64811bcb2c/exasol_integration_test_docker_environment/lib/api/spawn_test_environment.py#L35)
93
151
function. The parameter values can be provided in the CLI options. Currently, it is possible to set values of the following parameters:
94
152
-`--itde-db-mem-size`
@@ -97,7 +155,7 @@ function. The parameter values can be provided in the CLI options. Currently, it
97
155
-`--itde-additional-db-parameter`
98
156
-`--itde-db-version`
99
157
100
-
In the example below the tests are run using an instance of the DockerDB with increased memory.
158
+
This example runs the tests using an instance of the DockerDB with increased memory.
0 commit comments