Closed yeti9990 closed 11 months ago
The solution is to install:
pytest-env
pytest-dotenv
use either the pytest.ini or create a .env which i think is best. The pytest.ini will override .env or os environ.
my .env looks like:
GRID_MGR=192.168.40.60
USERNAME=admin
PASSWORD=infoblox
SSL_VERIFY=False
WAPI_VER=2.12
Need to add
.env
support or OS environment variables for test cases to work in different labs and environments.Minimally we'll need to support:
there may be others as well.
https://pytest-with-eric.com/pytest-best-practices/pytest-environment-variables/
This suggests using
pytest-env
as the best method.