No description
Find a file
2023-12-14 12:13:00 +01:00
docs add docs for # Create custom Tests 2023-12-13 00:16:50 +01:00
envfiles@a8375f6fc7 [WIP] Add new automated test framework (#1) 2023-11-22 21:40:13 +01:00
previous-work refactoring (#13) 2023-12-08 18:17:31 +01:00
prototyping move docs to docs dir 2023-12-11 02:17:08 +01:00
pytest_abra add file change check to copy_env_files, add test cases for copy_env_files 2023-12-14 11:38:55 +01:00
recipes use os.environ["TEST_USER"], fix check_if_user_exists 2023-12-14 12:13:00 +01:00
tests add file change check to copy_env_files, add test cases for copy_env_files 2023-12-14 11:38:55 +01:00
.gitignore add example credentials 2023-12-11 11:32:35 +01:00
.gitmodules [WIP] Add new automated test framework (#1) 2023-11-22 21:40:13 +01:00
credentials-example.json add example credentials 2023-12-11 11:32:35 +01:00
docker-compose.yml [WIP] Add new automated test framework (#1) 2023-11-22 21:40:13 +01:00
Dockerfile fix-docker (#10) 2023-12-07 13:02:39 +01:00
main.py fix paths 2023-12-13 17:00:34 +01:00
pyproject.toml pin all versions 2023-12-12 11:12:02 +01:00
README.md improve docs 2023-12-12 15:38:28 +01:00

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:

  • abratest CLI command. Used to initialize the testing.

  • pytest-abra Pytest plugin. Automatically loads custom fixtures in any pytest run (see pytest_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