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样式 的问题

 

相关文章:

  • 2021-07-10
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2023-03-25
  • 2021-11-05
  • 2021-08-04
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案