From 1ef024835d8d7da9ddc37e4ca780d9c4b89af335 Mon Sep 17 00:00:00 2001 From: John Ferguson Smart Date: Thu, 30 Jan 2025 08:41:23 +0000 Subject: [PATCH] Possible fix for issue displaying durations in parameterized tests --- .../src/main/java/net/thucydides/core/steps/StepEventBus.java | 2 +- .../net/serenitybdd/junit5/SerenityTestExecutionListener.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/serenity-core/src/main/java/net/thucydides/core/steps/StepEventBus.java b/serenity-core/src/main/java/net/thucydides/core/steps/StepEventBus.java index ac39958cb..74a551ea7 100644 --- a/serenity-core/src/main/java/net/thucydides/core/steps/StepEventBus.java +++ b/serenity-core/src/main/java/net/thucydides/core/steps/StepEventBus.java @@ -493,7 +493,7 @@ public void finishTestRun() { } public void testFinished() { - testFinished(false); + testFinished(this.isCurrentTestDataDriven()); } private TestOutcome checkForEmptyScenarioIn(TestOutcome outcome) { diff --git a/serenity-junit5/src/main/java/net/serenitybdd/junit5/SerenityTestExecutionListener.java b/serenity-junit5/src/main/java/net/serenitybdd/junit5/SerenityTestExecutionListener.java index 005d1d627..13b62fd17 100644 --- a/serenity-junit5/src/main/java/net/serenitybdd/junit5/SerenityTestExecutionListener.java +++ b/serenity-junit5/src/main/java/net/serenitybdd/junit5/SerenityTestExecutionListener.java @@ -298,11 +298,12 @@ public synchronized void executionFinished(TestIdentifier testIdentifier, TestEx if (isMethodSource(testIdentifier)) { MethodSource methodSource = ((MethodSource) testIdentifier.getSource().get()); String sourceMethod = methodSource.getClassName() + "." + methodSource.getMethodName(); - testFinished(testIdentifier, methodSource, testExecutionResult); +// testFinished(testIdentifier, methodSource, testExecutionResult); DataTable dataTable = dataTables.get(sourceMethod); if (dataTable != null) { eventBusFor(testIdentifier).exampleFinished(); } + testFinished(testIdentifier, methodSource, testExecutionResult); } } recordSummaryData(testIdentifier, testExecutionResult);