This is an extension of this question.
My pytest/tavern testsuite has some variables/data that is directly related to generating session keys (using hooks in the conftest.py
), and other test configuration. I was wondering if it would be acceptable to use the built in pytest.ini
file and define my variables using parser.addini()
? Additionally, I'm using parser.adoption()
to define vars I'd like to be updatable from the commandline.
Specifically wondering if this would have an impact on the test suites performance? The linked post mentions using other ini files (seems like a good solution), but I only need to store 20 vars or so (not unique to any single test, shared by the entire suite). So it seems like the default ini file may be preferable.
Additionally my team is using the Tavern framework, which is built on top of pytest. Tavern is great for creating test files, but doesn't seem great for configuring the suite. It offers setting variables in a config.yaml
file, but these are read directly into the test.yaml
file (not the conftest.py
which is what I need).
Help & input is appreciated, thanks!