首页 > Web开发 > 详细

如何解决Extent report 无法加载CSS样式 的问题

时间:2019-10-05 19:17:21      阅读:275      评论:0      收藏:0      [点我收藏+]

how to fix the ExtentReport.html without css styple

See the highlight, add htmlReporter.config().setResourceCDN(ResourceCDN.EXTENTREPORTS);

private void init(List<XmlSuite> xmlSuites) {
String suiteName = xmlSuites.get(0).getName();
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(OUTPUT_FOLDER + FILE_NAME);
htmlReporter.config().setDocumentTitle("ExtentReports: " + suiteName);
htmlReporter.config().setReportName(suiteName);
htmlReporter.config().setTestViewChartLocation(ChartLocation.TOP);
htmlReporter.config().setTheme(Theme.STANDARD);
htmlReporter.config().setChartVisibilityOnOpen(true);
htmlReporter.config().setEncoding("utf-8");
//Fix the report with css stype
htmlReporter.config().setResourceCDN(ResourceCDN.EXTENTREPORTS);

extent = new ExtentReports();
extent.attachReporter(htmlReporter);
extent.setReportUsesManualConfiguration(true);
}

After that, rerun the test, and open the report, it shows the css style as below.

技术分享图片

 

如何解决Extent report 无法加载CSS样式 的问题

原文:https://www.cnblogs.com/amy2012/p/11625394.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!