feat(reporting): Resilient composite reporters and lower memory HTML reports#258
Conversation
…ows to disk - Add ReporterErrorHandler to log failures and skip a reporter after the first error - Wrap each child in CompositeReporter with ReporterErrorHandler - Stream SimpleHtmlReporter message rows to a temp file to avoid holding all base64 screenshots in memory; assemble the final HTML in generate()
philipph-askui
left a comment
There was a problem hiding this comment.
Did you test this thoroughly, i.e. with edge cases such as crashing / terminating the execution?
| """ | ||
|
|
||
| template = Template(template_str) | ||
| _FOOTER = " </table>\n </div>\n </div>\n </body>\n </html>" |
There was a problem hiding this comment.
what if the content block of the html changes? Then, the number of whitespaces here will be incorrect, no?
|
@mlikasam-askui & @philipph-askui , can we finalize this PR? |
@programminx-askui |
|
We observed an issue with the tempfile during testing. The execution crashed due to a server-side timeout, but then we also got the following error: The reason seems to be a potential issue in SimpleHtmlReporter._get_temp_messages_file() (reporting.py:330-338). On Windows the unclosed file descriptor keeps an OS-level lock on the file. When generate() later tries to delete it with @mlikasam-askui : can you please take care of this? |
…ence-streaming-html
Summary
Improves reporting reliability when a single reporter fails, and reduces memory use for large HTML reports that include many screenshots.
Changes