且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ExtentReports:运行使用maven-assembly-plugin创建的可执行jar文件时,HtmlReporter无法启动

更新时间:2023-09-18 07:54:04

此问题已由我遇到的另一个问题解决.

This issue got fixed with the other issue I was having.

所以,我遇到的主要问题是加载extent-config.xml文件.因此,我更改了加载extent-config.xml文件的位置,如下所示:

So, the main problem I was having was loading the extent-config.xml file. Thus, I changed the location for loading the extent-config.xml file as follows:

File extentConfigFile = new File(classLoader.getResource("extent-config.xml").getFile());

File extentConfigFile = new File("./classes/extent-config.xml");

通过这种方式,测试用例将顺利执行.

In this manner, the test cases will execute smoothly.