What is the recommended approach for accessing TestReport data from other hooks? #899
Unanswered
Tishinator
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I am looking to use some information from my test in the
pytest_html_results_summary
.The test data im looking for can be found in the TestReport object when you yield the outcome in the
pytest_runtest_makereport
hook.So my question is:
What is the recommended approach for getting this information from the
pytest_runtest_makereport
topytest_html_results_summary
hook?I've seen multiple approaches to this:
Each of these approaches works, but I was wondering if there was a recommended way to approach this problem.
Regardless of approach, it seems like I will be saving the report objects in the
pytest_runtest_makereport
but the question is whats the best way to do that?Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions