diff --git a/CHANGELOG.md b/CHANGELOG.md index 85e7483..e09b712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog ## [Unreleased] +### Added +- `TestNGService.buildFinishLaunchRq` method to allow customization of launch finish request, by @HardNorth + +### Changed +- Client version upgraded on [5.2.23](https://github.com/reportportal/client-java/releases/tag/5.2.23), by @HardNorth ## [5.4.4] ### Added diff --git a/build.gradle b/build.gradle index 08fb5a1..1077424 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ repositories { } dependencies { - api 'com.epam.reportportal:client-java:5.2.20' + api 'com.epam.reportportal:client-java:5.2.23' compileOnly "org.testng:testng:${testng_version}" implementation 'org.slf4j:slf4j-api:2.0.4' diff --git a/src/main/java/com/epam/reportportal/testng/TestNGService.java b/src/main/java/com/epam/reportportal/testng/TestNGService.java index e353b74..f78311d 100644 --- a/src/main/java/com/epam/reportportal/testng/TestNGService.java +++ b/src/main/java/com/epam/reportportal/testng/TestNGService.java @@ -135,8 +135,7 @@ public void startLaunch() { @Override public void finishLaunch() { - FinishExecutionRQ rq = new FinishExecutionRQ(); - rq.setEndTime(Calendar.getInstance().getTime()); + FinishExecutionRQ rq = buildFinishLaunchRq(launch.get().getParameters()); launch.get().finish(rq); launch.reset(); Runtime.getRuntime().removeShutdownHook(shutDownHook); @@ -608,6 +607,19 @@ protected StartLaunchRQ buildStartLaunchRq(ListenerParameters parameters) { return rq; } + /** + * Extension point to customize launch finishing event/request + * + * @param parameters Launch Configuration parameters + * @return Request to ReportPortal + */ + @SuppressWarnings("unused") + protected FinishExecutionRQ buildFinishLaunchRq(ListenerParameters parameters) { + FinishExecutionRQ rq = new FinishExecutionRQ(); + rq.setEndTime(Calendar.getInstance().getTime()); + return rq; + } + /** * Extension point to customize test suite on it's finish *