Skip to content

Commit

Permalink
Adding the correct test method name
Browse files Browse the repository at this point in the history
  • Loading branch information
augustocristian committed Aug 14, 2024
1 parent 0d26b62 commit ae0afb3
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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("[{}] {} {}",
Expand All @@ -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("[{}] {} {}",
Expand Down

0 comments on commit ae0afb3

Please sign in to comment.