How to use cli option value to parametrize tests? #11147
Unanswered
DenisKuplyakov
asked this question in
Q&A
Replies: 1 comment
-
In these cases it's best to use the pytest-configure hook to register a plugins class with temporary declared fixtures and having the data loaded there |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to read some JSON data file and use it's keys to parametrize tests. It looks like a right way is to provide path to this file through command line options. Here I've found a recommendation on how to deal with cli options. But the recommended way is to store cli option value as fixture, so I can't further use it to parametrize tests.
By the moment I reverted to usage of env variables for the task. But, I am curious, is there any way to reach the goal by cli option?
Beta Was this translation helpful? Give feedback.
All reactions