Skip to content

Commit 6417e74

Browse files
committed
critical fix: ExtentReports v4.1.2 KlovReporter makes it mandatory to specify the project name
1 parent 79e58e9 commit 6417e74

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/aventstack/extentreports/service/ExtentService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import java.util.Optional;
88
import java.util.Properties;
99

10-
import com.aventstack.extentreports.ExtentReporter;
1110
import com.aventstack.extentreports.ExtentReports;
1211
import com.aventstack.extentreports.reporter.ConfigurableReporter;
1312
import com.aventstack.extentreports.reporter.ExtentAventReporter;
@@ -17,6 +16,7 @@
1716
import com.aventstack.extentreports.reporter.ExtentHtmlReporter;
1817
import com.aventstack.extentreports.reporter.ExtentKlovReporter;
1918
import com.aventstack.extentreports.reporter.ExtentLoggerReporter;
19+
import com.aventstack.extentreports.reporter.ExtentReporter;
2020
import com.aventstack.extentreports.reporter.ExtentTabularReporter;
2121

2222
public class ExtentService implements Serializable {
@@ -199,16 +199,17 @@ private static void initHtml(Properties properties) {
199199
}
200200

201201
private static void initKlov(Properties properties) {
202-
ExtentKlovReporter klov = new ExtentKlovReporter();
202+
ExtentKlovReporter klov = new ExtentKlovReporter("Default");
203203
String configPath = properties == null ? System.getProperty(CONFIG_KLOV_KEY)
204204
: String.valueOf(properties.get(CONFIG_KLOV_KEY));
205-
if (configPath != null && !configPath.isEmpty())
205+
if (configPath != null && !configPath.isEmpty()) {
206206
try {
207207
klov.loadInitializationParams(configPath);
208208
INSTANCE.attachReporter(klov);
209209
} catch (FileNotFoundException e) {
210210
e.printStackTrace();
211211
}
212+
}
212213
}
213214

214215
private static void initLogger(Properties properties) {

0 commit comments

Comments
 (0)