0

I need to run test on different env (dev, staging, prod) depending on the command sent via cli

pytest -sv --env_name=smoke --platform=android conftest.py

Can I get arguments sent via cli using Pytest in the helper class say env.py and return the configs I need? thanks

In general, I need to send env and get a host depending on the environment

Jürgen Gmach
  • 4,063
  • 2
  • 18
  • 26
  • You seem to look for argv in pytest, which is covered [here](https://stackoverflow.com/questions/40880259/how-to-pass-arguments-in-pytest-by-command-line) or [there](https://stackoverflow.com/questions/56110064/how-to-handle-sys-argv-in-pytest) – Demi-Lune Nov 28 '21 at 09:00

0 Answers0