pytest-html
pytest-html copied to clipboard
[Feature Request] Need report object in pytest_html_results_summary hook to extend the summary section
It would be too good if we add "report" object to the pytest_html_results_summary hook, so that in runtime can use the objects in report like outcome, location,sections,for customization option. If we added it then it would be good to create the test summary table section consists of test_group_name,total tests in folder categorized by requirement,passed&failed&skipped in summary table section .If we implement this it would be good to provide overall coverage.
Otherwise we can provide hooks like html_table,row,column hooks already available
I think that the test summary thing maybe is related to #187 and the coverage to #191, you maybe could comment there.
About the hook, why not? Are you going to implement it?
Thanks for your reply @RibeiroAna . I looking to mention the below summary table(for example)
This summary table would give us good overall coverage based upon the scenario/requirement against the tests done. I think it would be useful for better reporting.
As for as i know i gone through the plugin.py file info , if we provide report object to the hook - pytest_html_results_summary(prefix, summary, postfix) then we can extend the summary section like Results table that we have. By providing this we can access the items available in pytest report object and hope implement the summary table.
If not possible please let me know how can i customize the summary section / html report the table that i needed. Thanks.
I do not understand your request. Pytest-HTML does provide a summary with the number of tests that passed/failed/etc, is your request doing it as a table instead of a list as it is now? About coverage, I think it is related to #191. @davehunt Do you see it with another eyes?
It sounds to me like @kvenkat88 wants to replace the generated summary with their own, rather than modifying the generated summary and adding surrounding HTML. It would be possible to add support for a new hook such as pytest_html_generate_results_summary
, which could be overridden to replace the summary. We'd need to pass everything required for our default implementation (maybe this is just the TestResult
instance?). Perhaps @kvenkat88 could comment if we're on the right track..?
@davehunt you are on the right track.If we add new hook as you suggested it wld give us more detailed information to our reports based upon the requirements/feature tested. Thanks.
If no one objects, I am going to look into implementing this hook
If no one objects, I am going to look into implementing this hook
Before doing anything, I would love it if you, @ssbarnea and I could do a zoom-meeting or something to go through the current list of issues and to at least a rough prioritization/"grooming".
I'm pretty certain there are both duplicate issues and issues with more or less overlap.
@gnikonorov
@BeyondEvil - sure I'd love to set up a meeting for prioritization. What time works best for everyone? I am generally free most weekends, and after 8 PM EST or before 9AM EST on weekdays. Please feel free to reach me at the email on my GitHub, if that is easier to communicate over.
@ssbarnea
@BeyondEvil - sure I'd love to set up a meeting for prioritization. What time works best for everyone? I am generally free most weekends, and after 8 PM EST or before 9AM EST on weekdays. Please feel free to reach me at the email on my GitHub, if that is easier to communicate over.
@ssbarnea
I've sent you an email. :)