e2e_tests/README.md
Daniel d2cfc089c3 fix-docker (#10)
* fix docker
-> use "pip install -e ." in installation
-> add symlinks in docker image
-> docker / non docker execution can run same main.py + cli

* remove sh scripts

* remove requirements.txt

Reviewed-on: local-it-infrastructure/e2e_tests#10
Co-authored-by: Daniel <d.brummerloh@gmail.com>
Co-committed-by: Daniel <d.brummerloh@gmail.com>
2023-12-07 13:02:39 +01:00

73 lines
1.3 KiB
Markdown

# pytest-abra
...description...
# Usage
To use pytest-abra, follow these steps:
## 1. GIT Clone
To clone with submodules, use these git commands:
```bash
git clone --recurse-submodules <repository>
git submodule update --init // add submodule after normal cloning
git submodule update --remote // update submodules
```
## Run
You can run pytest-abra with and without Docker. Choose now and follow the steps accordingly:
## 2.1 Run without Docker
### Installation
Create a python environment and install all dependencies via
```bash
pip install -e .
playwright install
```
Run the script with
```bash
python main.py
```
# 2.2 Run with Docker
```bash
docker compose build # build the image
docker compose run --rm app python main.py # run pytest-abra
docker compose run --rm -it app /bin/bash # debug the container
```
Force rebuild with cache
```bash
docker-compose up --build
```
Force rebuild without cache
```bash
docker-compose build --no-cache
```
## Codegen
Use playwright codegen to create code for new testes easily https://playwright.dev/python/docs/codegen
```bash
playwright codegen demo.playwright.dev/todomvc
```
## Development
```bash
pytest # test pytest-abra
pytest --collect-only # debug test pytest-abra
docker compose run --rm app pytest # run pytest-abra
```