1.7 KiB
1.7 KiB
pytest-abra
Pytest-Abra is an installable python package baed on pytest, designed to test instances created with abra. After installation, you will have two things:
-
abratestCLI command. Used to initialize the testing. -
pytest-abraPytest plugin. Automatically loads custom fixtures in any pytest run (seepytest_abra/custom_fixtures.py)
Usage
Pytest-abra can easily be installed on any system but also offers a Docker image. To use pytest-abra, follow these steps:
Usage [without Docker]
Installation [without Docker]
To clone with submodules, use these git commands:
git clone --recurse-submodules <repository>
// optional:
git submodule update --init // add submodule after normal cloning
git submodule update --remote // update submodules
Create a python environment and install all dependencies via
pip install -e .
playwright install
Run [without Docker]
Run the helper script or directly use the cli command (see docs)
python main.py # run pytest-abra
abratest [options]
Usage [with docker]
Installation [with docker]
To clone with submodules, use these git commands:
git clone --recurse-submodules <repository>
// optional:
git submodule update --init // add submodule after normal cloning
git submodule update --remote // update submodules
Build the image
docker compose build # build the image
docker compose build --no-cache # Force rebuild without cache
Run [with docker]
Run the script
docker compose run --rm app python main.py # run pytest-abra
docker compose run --rm -it app /bin/bash # use the container interactively