HTML报告使用github伪像从github action下载时破坏了报告
我将测试运行到GitHub Action中,测试执行完成后,我使用github/Action-Artifact
下载生成的报告,然后打开报告时,该报告设计被打破了。
当我从GitHub Action下载报告时,它看起来像以下格式。
任何人都知道有什么问题?
I am running my test into GitHub action and after test execution is completed I download generated report using github/action-artifact
and when I open that report design is broken.
My report is in the below format when I generate it from my local.
and when I download reports from GitHub action it looks like the below format.
What is the problem can anyone know?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于您只是下载report.html文件,因此您的报告扭曲了。我们还需要下载style.css文件,该文件是在资产文件夹中生成的。尝试类似以下代码的内容。我正在测试/报告文件夹中生成报告。在这里,我要保存包含资产文件夹和report.html的报告文件夹。
The reason you are getting the report distorted because you are just downloading the report.html file. We need to download the style.css file also which is generated in the assets folder. Try something like the below code. I'm generating the report in tests/Reports folder. Here, I'm saving the Reports folder that contains both Assets folder as well as Report.html.
请查找由PYTEST-HTML生成的HTML报告中的标头,它保留:
如果您有屏幕截图(使用Extras),则它们位于基于屏幕中。
我相信其余的都包含在 *.html文件中。
Please look up the header in the html report generated by pytest-html, it holds:
If you have screenshots (using Extras), they are located in basedir.
The rest I believe is enclosed in the *.html file.