-
Notifications
You must be signed in to change notification settings - Fork 244
Feature Request: Easy use of pytest-html #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
First of all, which version are you using?
Feel free to share the code that you've tried so far and maybe we can help you get to a working solution. |
The header and row hooks documentation is not available online or if you look inside docs, it didn't work for me. If you tried to do what I wanted with the table I couldn't make it work with the online documentation and information I found. If you try to make the columns I talked about, you will see what I am talking about. There's no easy or hard way to do it. From the hooks (report) you can't even get the error message and there definitely isn't documentation for this on how to do this.. I'm using the latest version you get when installing Thanks for the help and the library, it's really great and awesome, there's no package like it and it works really great, this is just some feedback from my side on more advanced topics. |
Please use the new RC: Please share what you have tried so far in code. The report object is coming from |
Ok I am saying, the example that you have in the readme, doesn't work by default. import pytest
def pytest_html_results_table_header(cells):
cells.insert(2, "<th>Description</th>")
def pytest_html_results_table_row(report, cells):
cells.insert(2, "<td>ATRY</td>")
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_makereport(item, call):
outcome = yield
report = outcome.get_result()
report.description = str(item.function.__doc__) |
What version are you using? In what way does the header not work? Can you share a screenshot? |
All versions @ latest and the version mentioned above. 4.0.0.r4
On Tue, 16 May 2023 at 09:46, Jim Brännlund ***@***.***> wrote:
What version are you using?
—
Reply to this email directly, view it on GitHub
<#670 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AX3T4JPXYWF33CUVBUZM2X3XGMWERANCNFSM6AAAAAAX377XXA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
|
@BeyondEvil Any update on the hooks? |
Doing some work on them, but been busy with other stuff the past week. |
Ok thanks for the update. Let me know when they work, I couldn't get it to work with the tables.. |
@FHanckeEnelion This is an issue where the documentation (both in repo and on readthedocs) is based off of latest master and not on the latest release. If you read through this entire issue, you'll see that this is for |
No, I talked about fully installing it with the specified version 4.0.0rc4 and it wouldn't work properly. |
I'm hitting the same issues with version 4.1.1. |
yes, I am also experiencing the same issue with version 4.1.1 |
Part 1
I think there should be an easy way to choose the columns and some way to configure it without actually diving deep because it isn't even working for me.
I think the library should provide a way to configure columns, let's say that we keep the default columns, which are Result, Test, Duration, Link.
I would like to add to an env, just like timestamp, remove link and duration, add result summary (actual error / short version).
Part 2
The other feature I would like to have is instead of Failed or Passed. I'm fine with Passed but I would like to know which Error and outline it in Red for instance..
Instead of Failed, KeyError.
Quick ask if anyone knows, how to add the to the result table (all the solutions didn't work properly like online and docs). Currently I'm looking for adding Error Type to the header and Exception Message (short).
The text was updated successfully, but these errors were encountered: