<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hey py.testers!<div class=""><br class=""></div><div class="">I’ve been working on pulling a feature out of our pytest-mozwebqa plugin into a standalone plugin. I think others may find it useful, and it would simplify maintenance of the former plugin to split this out. Please take a look over the pytest-html plugin, the source code is available here: <a href="https://github.com/davehunt/pytest-html" class="">https://github.com/davehunt/pytest-html</a></div><div class=""><br class=""></div><div class="">Basically this plugin provides a new command line option of —html which allows the user to specify a path for a HTML report to be generated. The report can then be enhanced by adding extra components via  the pytest_runtest_makereport hook. You can see an example of this in my in-progress branch of pytest-mozwebqa where I’ve switched to using the new plugin: <a href="https://github.com/davehunt/pytest-mozwebqa/blob/1074f0770a146cff3108191a2fe239d15cfd92e4/pytest_mozwebqa/pytest_mozwebqa.py#L126" class="">https://github.com/davehunt/pytest-mozwebqa/blob/1074f0770a146cff3108191a2fe239d15cfd92e4/pytest_mozwebqa/pytest_mozwebqa.py#L126</a></div><div class=""><br class=""></div><div class="">What I’d like some help with is providing the HTML report with environment details. This is essentially just a dictionary that will be included in the HTML report, but should be optionally provided by another plugin or conftest.py file. At the moment I accept an environment keyword argument when instantiating the HTMLReport object, but I’m not aware of a way to influence this from another plugin. See: <a href="https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L44" class="">https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L44</a> and <a href="https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L195" class="">https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L195</a></div><div class=""><br class=""></div><div class="">If anybody has any advice it would be much appreciated!</div><div class=""><br class=""></div><div class="">Thanks in advance,<br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">--</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><strong class="">Dave Hunt</strong></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="moz-signature">Automation Engineer<br class="">Mozilla Corporation<br class=""><a href="mailto:dhunt@mozilla.com" class="">dhunt@mozilla.com</a></div></div>
</div>
<br class=""></div></body></html>