No description
This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 78.6%
  • Gherkin 20.6%
  • Shell 0.6%
  • Dockerfile 0.2%
Find a file
Thenuja Viknarajah 2f68a6161a
Some checks failed
ci / tests (push) Failing after 57s
ci / build_master_release (push) Has been skipped
update pytest to write to mounted volume
2022-11-03 19:29:41 +00:00
.github/workflows remove mypy temp 2022-11-03 19:16:23 +00:00
azure_actions BPL-480 update carina blob storage paths 2022-05-12 14:23:22 +03:00
db Black & isort error resolved 2022-03-16 17:50:16 +00:00
tests BPL-480 update carina blob storage paths 2022-05-12 14:23:22 +03:00
.env.example Update example.env with correct base urls 2022-05-05 09:18:30 +01:00
.flake8 add mypy and black ci, fix mypy and module name overrides 2021-04-15 16:26:14 +03:00
.gitignore force long bdd phrases to use a single line 2021-12-08 14:19:01 +02:00
.mypy.ini BPL-278 update mypy plugin to sqlalchemy2-stubs 2021-10-29 17:59:27 +03:00
Dockerfile update Dockerfile for cronjob 2022-11-03 19:28:20 +00:00
enums.py The big renaming 2022-01-27 23:34:17 +00:00
env_local Added_reporting 2022-01-31 17:16:15 +00:00
Pipfile update bink-pypi url 2022-11-03 19:08:57 +00:00
Pipfile.lock update bink-pypi url 2022-11-03 19:08:57 +00:00
pyproject.toml add get by credentials tests 2021-04-09 17:37:44 +03:00
pytest.ini update pytest to write to mounted volume 2022-11-03 19:29:41 +00:00
README.md changed namespace from readme and example file 2022-04-26 11:18:27 +01:00
report-render.sh update azure path 2022-11-03 17:35:50 +00:00
schedule.py Catch generic SubprocessError for info on failed pytest runs 2021-10-25 12:36:12 +01:00
settings.py The big renaming 2022-01-27 23:34:17 +00:00

BPL Automation Tests

BDD style automated tests for testing BPL in isolation.

Local Project Setup

Install dependencies:

Install the prerequisites for psycopg2:

brew install postgres openssl
export LDFLAGS="-L/usr/local/opt/openssl/lib"

Then install the project dependencies:

pipenv install --dev
.env setup

Copy the .env.example file which should have everything you need for local development

cp .env.example .env
Azure setup

Install Azure CLI and login to Azure for Key Vault access

brew install azure-cli

az login
Run test suite (pointing at dev):
pytest -m bpl

Environment Variables

  • POLARIS_DATABASE_URI: URI to the Polaris database
  • VELA_DATABASE_URI: URI to the Vela database
  • VAULT_URL: URL for Azure Key Vault
  • LOCAL: Set to True for local testing, disables teams webhook and saving reports to blob storage. Defaults to False
  • TEAMS_WEBHOOK: Webhook to send alerts to the "Alerts - QA" channel when the test suite runs
  • BLOB_STORAGE_DSN: DSN to connect to blob storage
  • REPORT_CONTAINER: Blob storage container to save reports to. Defaults to qareports
  • REPORT_DIRECTORY: Blob storage directory to save reports to. Defaults to bpl/isolated/
  • FRIENDLY_NAME: Name used on report headers and teams alerts. Defaults to BPL
  • SCHEDULE: Cron schedule for running the scheduled reports
  • COMMAND: Command that the the scheduled task runs, Defaults to: pytest --html report.html --self-contained-html -s -m bpl
  • ALERT_ON_SUCCESS: Set to True to send teams alerts when the test suite runs successfully. Defaults to True
  • ALERT_ON_FAILURE: Set to True to send teams alerts when the test suite fails to run. Defaults to True
  • POLARIS_BASE_URL: Base URL for the customer management api e.g. https://bpl.dev.gb.bink.com/bpl/loyalty
  • VELA_BASE_URL: Base URL for the retail campaign management api e.g. https://bpl.dev.gb.bink.com/bpl/retailers
  • CARINA_BASE_URL: Base URL for the rewards management api e.g. https://bpl.dev.gb.bink.com/bpl/rewards
  • MOCK_SERVICE_BASE_URL: URL to send for the callback_url during enrolment requests