Skip to content

Commit 0acc3fe

Browse files
committed
#2541 Refine test naming in ExtentReportExtension
Use "ClassName.TestName" format for test names in reports. This change improves traceability by associating tests with their respective classes, making debugging and analysis more intuitive.
1 parent 8d1bf10 commit 0acc3fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jme3-screenshot-tests/src/main/java/org/jmonkeyengine/screenshottests/testframework/ExtentReportExtension.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public void testDisabled(ExtensionContext context, Optional<String> reason) {
101101
@Override
102102
public void beforeTestExecution(ExtensionContext context) {
103103
String testName = context.getDisplayName();
104-
currentTest = extent.createTest(testName);
104+
String className = context.getRequiredTestClass().getSimpleName();
105+
currentTest = extent.createTest(className + "." + testName);
105106
}
106107

107108
public static ExtentTest getCurrentTest() {

0 commit comments

Comments
 (0)