From 997c6e1c438fadd2a499b845b21fb0e3658df3b6 Mon Sep 17 00:00:00 2001 From: An Vo Date: Fri, 17 May 2024 23:47:51 +0700 Subject: [PATCH] Update PW 1.44.0 --- .gitignore | 2 +- pom.xml | 24 +++++++++---------- .../reports/ExtentReportManager.java | 3 ++- .../java/com/anhtester/common/BaseTest.java | 2 +- src/test/resources/config/config.properties | 15 ++++++------ 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 5628c0d..d3b4b79 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,6 @@ buildNumber.properties .mvn/wrapper/maven-wrapper.jar *.zip .idea/ -reports/ +report/ logs/ *.iml diff --git a/pom.xml b/pom.xml index c821ec6..f9b687d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.anhtester PlaywrightJava - 1.41.1 + 1.44.0 17 @@ -19,21 +19,21 @@ com.microsoft.playwright playwright - 1.41.1 + 1.44.0 org.testng testng - 7.9.0 + 7.10.2 org.slf4j slf4j-api - 2.0.11 + 2.0.13 @@ -61,7 +61,7 @@ commons-io commons-io - 2.15.1 + 2.16.1 @@ -75,14 +75,14 @@ org.apache.logging.log4j log4j-core - 3.0.0-beta1 + 2.23.1 org.apache.logging.log4j log4j-api - 3.0.0-beta1 + 2.23.1 @@ -96,28 +96,28 @@ io.qameta.allure allure-testng - 2.25.0 + 2.27.0 io.qameta.allure allure-attachments - 2.25.0 + 2.27.0 org.aspectj aspectjweaver - 1.9.21 + 1.9.22.1 org.projectlombok lombok - 1.18.30 + 1.18.32 provided @@ -125,7 +125,7 @@ com.google.guava guava - 33.0.0-jre + 33.2.0-jre diff --git a/src/main/java/com/anhtester/reports/ExtentReportManager.java b/src/main/java/com/anhtester/reports/ExtentReportManager.java index c2d3932..c632efb 100644 --- a/src/main/java/com/anhtester/reports/ExtentReportManager.java +++ b/src/main/java/com/anhtester/reports/ExtentReportManager.java @@ -1,5 +1,6 @@ package com.anhtester.reports; +import com.anhtester.helpers.PropertiesHelper; import com.aventstack.extentreports.ExtentReports; import com.aventstack.extentreports.reporter.ExtentSparkReporter; @@ -8,7 +9,7 @@ public class ExtentReportManager { private static final ExtentReports extentReports = new ExtentReports(); public synchronized static ExtentReports getExtentReports() { - ExtentSparkReporter reporter = new ExtentSparkReporter("reports/ExtentReport/ExtentReport.html"); + ExtentSparkReporter reporter = new ExtentSparkReporter(PropertiesHelper.getValue("EXTENT_REPORT_PATH")); reporter.config().setReportName("Extent Report | Anh Tester"); extentReports.attachReporter(reporter); extentReports.setSystemInfo("Framework Name", "Selenium Java | Anh Tester"); diff --git a/src/test/java/com/anhtester/common/BaseTest.java b/src/test/java/com/anhtester/common/BaseTest.java index 07a1fa5..2998b2a 100644 --- a/src/test/java/com/anhtester/common/BaseTest.java +++ b/src/test/java/com/anhtester/common/BaseTest.java @@ -9,7 +9,7 @@ public class BaseTest { @BeforeMethod - @Parameters({"browser"}) + @Parameters({"BROWSER"}) public void createBrowser(@Optional("chrome") String browserName) { BrowserFactory.createBrowser(browserName); } diff --git a/src/test/resources/config/config.properties b/src/test/resources/config/config.properties index 54e3638..9af7d08 100644 --- a/src/test/resources/config/config.properties +++ b/src/test/resources/config/config.properties @@ -1,10 +1,11 @@ -browser=chrome -email=admin@example.com -password=123456 -timeout=20 -url=https://crm.anhtester.com/admin/authentication -SCREENSHOT_PATH=reports/Screenshots/ -VIDEO_RECORD_PATH=reports/VideoRecords/ +BROWSER=chrome +EMAIL=admin@example.com +PASSWORD=123456 +TIMEOUT=20 +URL=https://crm.anhtester.com/admin/authentication +SCREENSHOT_PATH=report/Screenshots/ +VIDEO_RECORD_PATH=report/VideoRecords/ +EXTENT_REPORT_PATH=report/ExtentReport/ExtentReport.html HEADLESS=false VIDEO_RECORD=false SCREENSHOT_FAIL=true