From aa3f83c8b80cf987d7deabb4fc841e9d91b8d396 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Wed, 1 Oct 2025 15:44:48 +0300 Subject: [PATCH 1/4] CHANGELOG.md update --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6b18fe..4353fa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ - Client version updated on [5.4.3](https://github.com/reportportal/client-java/releases/tag/5.4.3), by @HardNorth - Replace "jsr305" annotations with "jakarta.annotation-api", by @HardNorth - Switch on use of `Instant` class instead of `Date` to get more timestamp precision, by @HardNorth +### Removed +- Java 8-10 support, by @HardNorth ## [5.4.2] ### Changed From ea71d7ab519a701fcaa111714fab945864bb17fa Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 16 Oct 2025 12:57:59 +0300 Subject: [PATCH 2/4] Client version update --- CHANGELOG.md | 2 ++ build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4353fa1..e42587e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +### Changed +- Client version updated on [5.4.4](https://github.com/reportportal/client-java/releases/tag/5.4.4), by @HardNorth ## [5.5.0] ### Changed diff --git a/build.gradle b/build.gradle index d922e83..2c838eb 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ repositories { } dependencies { - api 'com.epam.reportportal:client-java:5.4.3' + api 'com.epam.reportportal:client-java:5.4.4' compileOnly ("org.jbehave:jbehave-core:${project.jbehave_version}") { exclude group: 'junit' exclude group: 'org.junit.vintage' @@ -55,7 +55,7 @@ dependencies { testImplementation 'org.hamcrest:hamcrest-core:2.2' testImplementation "org.mockito:mockito-core:${project.mockito_version}" testImplementation "org.mockito:mockito-junit-jupiter:${project.mockito_version}" - testImplementation 'ch.qos.logback:logback-classic:1.5.18' + testImplementation 'ch.qos.logback:logback-classic:1.5.19' testImplementation 'com.epam.reportportal:logger-java-logback:5.4.0' testImplementation "org.junit.jupiter:junit-jupiter-api:${project.junit5_version}" testImplementation "org.junit.jupiter:junit-jupiter-params:${project.junit5_version}" From 95238e290d23bd55e1a85f33c0cdfa6fd8d6c587 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 16 Oct 2025 12:58:41 +0300 Subject: [PATCH 3/4] .gitignore update --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ea9fa8a..5f0a12a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ build/ target/ out/ *.iml +bin/ From 79a43b97662abd616d7aa3ab14533c68fb3a896b Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 16 Oct 2025 13:26:02 +0300 Subject: [PATCH 4/4] Minor item order fix --- .../jbehave/ReportPortalStoryReporter.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/epam/reportportal/jbehave/ReportPortalStoryReporter.java b/src/main/java/com/epam/reportportal/jbehave/ReportPortalStoryReporter.java index 9201c7a..d6cbdf5 100644 --- a/src/main/java/com/epam/reportportal/jbehave/ReportPortalStoryReporter.java +++ b/src/main/java/com/epam/reportportal/jbehave/ReportPortalStoryReporter.java @@ -47,6 +47,7 @@ import org.slf4j.LoggerFactory; import java.time.Instant; +import java.time.temporal.ChronoUnit; import java.util.*; import java.util.function.Function; import java.util.function.Supplier; @@ -196,7 +197,7 @@ protected StartTestItemRQ buildStartStoryRq(@Nonnull Story story, @Nonnull Strin StartTestItemRQ rq = new StartTestItemRQ(); rq.setName(getStoryName(story)); rq.setCodeRef(codeRef); - rq.setStartTime(ofNullable(startTime).orElseGet(Instant::now)); + rq.setStartTime(ofNullable(startTime).orElseGet(() -> Instant.now().truncatedTo(ChronoUnit.MICROS))); rq.setType(ItemType.STORY.name()); rq.setAttributes(getAttributes(story)); rq.setDescription(story.getDescription().asString()); @@ -238,7 +239,7 @@ protected StartTestItemRQ buildStartScenarioRq(@Nonnull Scenario scenario, @Nonn StartTestItemRQ rq = new StartTestItemRQ(); rq.setName(getScenarioName(scenario)); rq.setCodeRef(codeRef); - rq.setStartTime(ofNullable(startTime).orElseGet(Instant::now)); + rq.setStartTime(ofNullable(startTime).orElseGet(() -> Instant.now().truncatedTo(ChronoUnit.MICROS))); rq.setType(ItemType.SCENARIO.name()); rq.setAttributes(getAttributes(scenario)); return rq; @@ -280,7 +281,7 @@ protected StartTestItemRQ buildStartExampleRq(@Nonnull Scenario scenario, @Nonnu StartTestItemRQ rq = new StartTestItemRQ(); rq.setName(getScenarioName(scenario)); rq.setCodeRef(codeRef); - rq.setStartTime(ofNullable(startTime).orElseGet(Instant::now)); + rq.setStartTime(ofNullable(startTime).orElseGet(() -> Instant.now().truncatedTo(ChronoUnit.MICROS))); rq.setType(ItemType.TEST.name()); rq.setParameters(getStepParameters(example)); rq.setDescription(String.format(PARAMETERS_PATTERN, MarkdownUtils.formatDataTable(example))); @@ -349,7 +350,7 @@ protected StartTestItemRQ buildStartStepRq(@Nonnull final String step, @Nonnull StartTestItemRQ rq = new StartTestItemRQ(); rq.setName(formatExampleStep(step, params)); rq.setCodeRef(codeRef); - rq.setStartTime(ofNullable(startTime).orElseGet(Instant::now)); + rq.setStartTime(ofNullable(startTime).orElseGet(() -> Instant.now().truncatedTo(ChronoUnit.MICROS))); rq.setType(ItemType.STEP.name()); Optional> usedParams = ofNullable(params).map(p -> getUsedParameters(step).stream() .filter(params::containsKey) @@ -377,7 +378,7 @@ protected StartTestItemRQ buildLifecycleSuiteStartRq(@Nonnull final String name, StartTestItemRQ rq = new StartTestItemRQ(); rq.setName(name); rq.setCodeRef(codeRef); - rq.setStartTime(ofNullable(startTime).orElseGet(Instant::now)); + rq.setStartTime(ofNullable(startTime).orElseGet(() -> Instant.now().truncatedTo(ChronoUnit.MICROS))); rq.setType(ItemType.TEST.name()); return rq; } @@ -397,7 +398,7 @@ protected StartTestItemRQ buildLifecycleMethodStartRq(@Nonnull final ItemType ty StartTestItemRQ rq = new StartTestItemRQ(); rq.setName(name); rq.setCodeRef(codeRef); - rq.setStartTime(ofNullable(startTime).orElseGet(Instant::now)); + rq.setStartTime(ofNullable(startTime).orElseGet(() -> Instant.now().truncatedTo(ChronoUnit.MICROS))); rq.setType(type.name()); return rq; } @@ -449,7 +450,7 @@ protected TestItemTree.TestItemLeaf createLeaf(@Nonnull final ItemType type, @No @Nonnull protected Instant getItemDate(@Nullable final TestItemTree.TestItemLeaf parent) { final Instant previousDate = ofNullable(parent).map(p -> p.getAttribute(START_TIME)).orElseGet(Instant::now); - Instant currentDate = Instant.now(); + Instant currentDate = Instant.now().truncatedTo(ChronoUnit.MICROS); Instant itemDate; if (previousDate.compareTo(currentDate) <= 0) { itemDate = currentDate; @@ -525,14 +526,12 @@ protected TestItemTree.TestItemLeaf retrieveLeaf() { exampleKey, k -> { String parentScenarioCodeRef = getCodeRef(parentCodeRef, parentScenarioKey, ItemType.SCENARIO); TestItemTree.TestItemLeaf leaf = createLeaf( - ItemType.SUITE, - buildStartExampleRq( + ItemType.SUITE, buildStartExampleRq( parentScenario, example, getCodeRef(parentScenarioCodeRef, k, ItemType.SUITE), itemDate - ), - parentLeaf + ), parentLeaf ); leaf.setAttribute(PARAMETERS, example); return leaf;