|
@@ -2,8 +2,9 @@ package com.provectus.kafka.ui.utilities.qaseUtils;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.Date;
|
|
|
+import java.time.OffsetDateTime;
|
|
|
+import java.time.ZoneOffset;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
|
|
|
import static com.provectus.kafka.ui.settings.BaseSource.SUITE;
|
|
|
import static org.apache.commons.lang3.BooleanUtils.FALSE;
|
|
@@ -13,7 +14,7 @@ import static org.apache.commons.lang3.StringUtils.isEmpty;
|
|
|
@Slf4j
|
|
|
public class QaseExtension {
|
|
|
|
|
|
- public static void setupQaseExtension() {
|
|
|
+ public static void setupTestRun() {
|
|
|
String qaseApiToken = System.getProperty("QASEIO_API_TOKEN");
|
|
|
if (isEmpty(qaseApiToken)) {
|
|
|
log.warn("QASEIO_API_TOKEN system property wasn't set. Support for Qase will be disabled.");
|
|
@@ -24,8 +25,8 @@ public class QaseExtension {
|
|
|
System.setProperty("QASE_PROJECT_CODE", "KAFKAUI");
|
|
|
System.setProperty("QASE_API_TOKEN", qaseApiToken);
|
|
|
System.setProperty("QASE_USE_BULK", TRUE);
|
|
|
- System.setProperty("QASE_RUN_NAME", "Automation " + SUITE.toUpperCase() + ": " +
|
|
|
- new SimpleDateFormat("dd.MM.yyyy HH:mm").format(new Date()));
|
|
|
+ System.setProperty("QASE_RUN_NAME", DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm")
|
|
|
+ .format(OffsetDateTime.now(ZoneOffset.UTC)) + ": " + "Automation " + SUITE.toUpperCase() + " suite");
|
|
|
}
|
|
|
}
|
|
|
}
|