Procházet zdrojové kódy

#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.
Richard Tingle před 1 měsícem
rodič
revize
0acc3fede7

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

@@ -101,7 +101,8 @@ public class ExtentReportExtension implements BeforeAllCallback, AfterAllCallbac
     @Override
     public void beforeTestExecution(ExtensionContext context) {
         String testName = context.getDisplayName();
-        currentTest = extent.createTest(testName);
+        String className = context.getRequiredTestClass().getSimpleName();
+        currentTest = extent.createTest(className + "." + testName);
     }
 
     public static ExtentTest getCurrentTest() {