Automated tests in Python for project Iced Latte -> https://github.com/Sunagatov/Iced-Latte/
For running tests should be created configs.py in root directory of format:
HOST = '<URL:port to app Online-Store>'
HOST_DB = '<URL to database of service>'
PORT_DB = '<port to database of service>'
DB_NAME = '<name database>'
DB_USER = '<username for connect to database>'
DB_PASS = '<password for connect to database>'
DEFAULT_PASSWORD = '<default password for test users>'
JWT_SECRET = '<default secret for JWT>'
./start_be.sh
or
./start_be.sh [tag]
# for example
./start_be.sh development-bf1ba24
Notes:
- optional parameter is a tag from the Docker Hub for BE image, default is the latest tag
- it might be necessary to make script executable before the first run
chmod +x ./start_be.sh
- the script will pull the specified version of BE image and start BE, Postgres and Minio
- if the tag on DockerHub is different from the latest commit on BE
development
branch, the script will print warning- periodically clean up the system by running
docker rm
Swagger will be available here http://localhost:8083/api/docs/swagger-ui/index.html.
To check the logs use:
docker-compose -f docker-compose.local.yml logs --tail 500
(!) BE SURE TO INSTALL ALLURE -> https://allurereport.org/docs/gettingstarted/installation/
To get the Allure report on the local computer, follow these steps in root directory:
python -m pytest ./tests --alluredir=allure_report --clean-alluredir
allure serve allure_report
For running pre-commit hooks should be installed pre-commit -> https://pre-commit.com/#install
pre-commit install
To run pre-commit hooks, execute next command before commit:
pre-commit run --all-files
For Ultimate Edition consider using Database Tools and SQL plugin
Install Database Navigator Plugin:
- double click Shift
- type Plugins
- type Database Navigator > click Install
- navigate to View > Tool Windows > DB Browser
- click New Connection
- select PostgesSQL
Go to View > Tool Windows > DB Browser.
Add new PostgresSQL connection:
- Host
127.0.0.1
- Database
testdb
- User
postgres
- Password
postgres
Enjoy!