Database-Playground

Automated tests

Backend testing is done via PyTest package Mainly, Integration testing is implemented, to check how program works in bound with exact database management systems (e.g PostgreSQL or MongoDB) Unit tests are implemented to, to check some inner logic (e.g query parsing for MongoEngine)

All the tests are in backend/tests directory The integration tests are marked with special decorator (@integration_test) The decorator skips the test if INTEGRATION_TEST environment variable is not set or set false

Testing pipeline should be activated with scripts in backend/scripts directory

# make sure to activate python virtual environment
# and install required packages

cd backend
./scripts/run_unit_tests.sh  # runs pytest without INTEGRATION_TEST env var


# If you want to run integration testing

docker compose up -d
./scripts/run/all_tests.sh  # runs pytest with INTEGRATION_TEST env var