diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/common/BaseLoggedTest.java b/src/test/java/com/fullteaching/e2e/no_elastest/common/BaseLoggedTest.java index 68377ba..9863d0e 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/common/BaseLoggedTest.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/common/BaseLoggedTest.java @@ -108,10 +108,10 @@ static void setupAll() { // 28 lines @BeforeEach void setup(TestInfo info) { //65 lines - log.info("##### Start test: {}" , info.getDisplayName()); + log.info("##### Start test: {}" , info.getTestMethod().get().getName()); TJOB_NAME = System.getProperty("dirtarget"); - teacher = setupBrowser("chrome", TJOB_NAME + "_" + info.getDisplayName(), "Teacher", WAIT_SECONDS); + teacher = setupBrowser("chrome", TJOB_NAME + "_" + info.getTestMethod().get().getName(), "Teacher", WAIT_SECONDS); driver = teacher.getDriver(); @@ -157,9 +157,9 @@ protected BrowserUser setupBrowser(String browser, String testName, } @AfterEach - void tearDown(TestInfo testInfo) { //13 lines + void tearDown(TestInfo info) { //13 lines if (this.teacher != null) { - log.info("##### Finish test: {} - Driver {}", testInfo.getDisplayName(), this.teacher.getDriver()); + log.info("##### Finish test: {} - Driver {}", info.getTestMethod().get().getName(), this.teacher.getDriver()); log.info("Browser console at the end of the test"); LogEntries logEntries = teacher.getDriver().manage().logs().get(BROWSER); logEntries.forEach(entry -> log.info("[{}] {} {}", @@ -173,7 +173,7 @@ void tearDown(TestInfo testInfo) { //13 lines } if (this.student != null) { - log.info("##### Finish test: {} - Driver {}", testInfo.getDisplayName(), this.student.getDriver()); + log.info("##### Finish test: {} - Driver {}", info.getTestMethod().get().getName(), this.student.getDriver()); log.info("Browser console at the end of the test"); LogEntries logEntries = student.getDriver().manage().logs().get(BROWSER); logEntries.forEach(entry -> log.info("[{}] {} {}",