Robot Framework keywords for Testcontainers.
Project description
robotframework-testcontainers
Robot Framework keywords for testcontainers.
Installation
- using
pip:
pip install robotframework-testcontainers
- using
uv:
uv add robotframework-testcontainers
- using
poetry:
poetry add robotframework-testcontainers
Usage
Starting a container can be done with a single keyword:
*** Settings ***
Library TestcontainersLibrary
*** Test Cases ***
Basic Usage Example
Create Docker Container image=hello-world
TestcontainersLibrary keeps track of all created containers.
It will take care of stopping all created containers at the end of the test,
by making use of the end_test/end_suite listener methods.
If you require more control, you can also manually start and stop the container. Additionally, you can use different wait strategies to wait for the container to be ready:
*** Settings ***
Library TestcontainersLibrary
*** Test Cases ***
Advanced Usage with more control
${container}= Create Docker Container image=traefik/whoami start=False ports=[80]
Start Container ${container}
Wait For Http Endpoint ${container} port=80 path=/api
Stop Container ${container}
You can also use any of the community maintained containers.
Be aware that you have to make sure to install the required dependencies
yourself.
For example: starting a CockroachDB container requires installing testcontainers[cockroachdb].
Use the Create Community Container keyword and specify which class to import from which module.
Any additional arguments can be passed in as keyword arguments.
*** Settings ***
Library TestcontainersLibrary
*** Test Cases ***
Starting an CockroachDb Container
${password}= Evaluate str(uuid.uuid4())
${container}= Create Community Container
... module=testcontainers.cockroachdb
... container_class=CockroachDBContainer
... username=demoUser
... password=${password}
Log ${container.get_connection_url()}
You can read the acceptance tests in test/acceptance/ for more concrete usage examples.
License
This project is licensed under the MIT License.
Third-Party Licenses
This library depends on the
testcontainers-python
package, which is licensed under the
Apache License 2.0.
No parts of testcontainers-python are copied or modified in this project.
It is used only as a dependency.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_testcontainers-0.2.0.tar.gz.
File metadata
- Download URL: robotframework_testcontainers-0.2.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e027291bd61ca7dea5f9ca77546f0b47c0e1f907d6497020df915d1a6e081573
|
|
| MD5 |
95cedb85751655666092d65f0d6cdd53
|
|
| BLAKE2b-256 |
c5dec68f76eb561471895ed45f00c1098c9b963dc4b1c1cc577709d925e6eeec
|
Provenance
The following attestation bundles were made for robotframework_testcontainers-0.2.0.tar.gz:
Publisher:
publish.yml on DudeNr33/robotframework-testcontainers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_testcontainers-0.2.0.tar.gz -
Subject digest:
e027291bd61ca7dea5f9ca77546f0b47c0e1f907d6497020df915d1a6e081573 - Sigstore transparency entry: 733359673
- Sigstore integration time:
-
Permalink:
DudeNr33/robotframework-testcontainers@897ea182a71c17c7ae69e0ee4685e495598fa9fd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/DudeNr33
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@897ea182a71c17c7ae69e0ee4685e495598fa9fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file robotframework_testcontainers-0.2.0-py3-none-any.whl.
File metadata
- Download URL: robotframework_testcontainers-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fdedaedbab40754c64aa03bde54192f7aaa2fe23168abddf9e75a96b6963e33
|
|
| MD5 |
53fc31b8297827300bfe1ab317a8944b
|
|
| BLAKE2b-256 |
1e77472e90b726854cb9811c502e32832724e79c95fb48530227fc638b06fcde
|
Provenance
The following attestation bundles were made for robotframework_testcontainers-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on DudeNr33/robotframework-testcontainers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_testcontainers-0.2.0-py3-none-any.whl -
Subject digest:
0fdedaedbab40754c64aa03bde54192f7aaa2fe23168abddf9e75a96b6963e33 - Sigstore transparency entry: 733359712
- Sigstore integration time:
-
Permalink:
DudeNr33/robotframework-testcontainers@897ea182a71c17c7ae69e0ee4685e495598fa9fd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/DudeNr33
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@897ea182a71c17c7ae69e0ee4685e495598fa9fd -
Trigger Event:
push
-
Statement type: