No description
- Python 78.6%
- Gherkin 20.6%
- Shell 0.6%
- Dockerfile 0.2%
| .github/workflows | ||
| azure_actions | ||
| db | ||
| tests | ||
| .env.example | ||
| .flake8 | ||
| .gitignore | ||
| .mypy.ini | ||
| Dockerfile | ||
| enums.py | ||
| env_local | ||
| Pipfile | ||
| Pipfile.lock | ||
| pyproject.toml | ||
| pytest.ini | ||
| README.md | ||
| report-render.sh | ||
| schedule.py | ||
| settings.py | ||
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 databaseVELA_DATABASE_URI: URI to the Vela databaseVAULT_URL: URL for Azure Key VaultLOCAL: Set to True for local testing, disables teams webhook and saving reports to blob storage. Defaults toFalseTEAMS_WEBHOOK: Webhook to send alerts to the "Alerts - QA" channel when the test suite runsBLOB_STORAGE_DSN: DSN to connect to blob storageREPORT_CONTAINER: Blob storage container to save reports to. Defaults toqareportsREPORT_DIRECTORY: Blob storage directory to save reports to. Defaults tobpl/isolated/FRIENDLY_NAME: Name used on report headers and teams alerts. Defaults toBPLSCHEDULE: Cron schedule for running the scheduled reportsCOMMAND: Command that the the scheduled task runs, Defaults to:pytest --html report.html --self-contained-html -s -m bplALERT_ON_SUCCESS: Set to True to send teams alerts when the test suite runs successfully. Defaults toTrueALERT_ON_FAILURE: Set to True to send teams alerts when the test suite fails to run. Defaults toTruePOLARIS_BASE_URL: Base URL for the customer management api e.g.https://bpl.dev.gb.bink.com/bpl/loyaltyVELA_BASE_URL: Base URL for the retail campaign management api e.g.https://bpl.dev.gb.bink.com/bpl/retailersCARINA_BASE_URL: Base URL for the rewards management api e.g.https://bpl.dev.gb.bink.com/bpl/rewardsMOCK_SERVICE_BASE_URL: URL to send for thecallback_urlduring enrolment requests