I am using tox to run pytest. Pytest runs test cases that tests API endpoints that required crednetials. I do not want to save my credentials in the code and set is as an environment variable in azure pipelines which will then call tox to run tests. Kindly suggest how I can make tox access environment variables or if there are better ways to handle credentials when testing APIs.
Asked
Active
Viewed 506 times
1 Answers
2
You can specify which environment variables are exported to tox and its subprocesses using the passenv
option in the Tox configuration.

Jürgen Gmach
- 5,366
- 3
- 20
- 37

mipadi
- 398,885
- 90
- 523
- 479