If you're puzzled by the absence of "Environment" on your pytest-allure reports, look no further. I tried a couple of different things, and this is what wound up working.
# Drop in to conftest.py import allure @pytest.hookimpl(trylast=True) def pytest_configure(config): allure.environment( url='example.com', browser=u'Google Chrome', environment="production", )
I'm guessing the reason is, is because the pytest_configure method gets ran multiple times and the initial setting of those values is lost in the process. Side note - Any custom kwargs you use will appear in the report also.