From 5ad5bed7e794526e59c20b17d026e66b31ef70ed Mon Sep 17 00:00:00 2001 From: An Vo Date: Tue, 21 May 2024 22:25:41 +0700 Subject: [PATCH] Fix screenshot step passed and all steps in report --- pom.xml | 35 +------------------ .../website/cms/pages/CommonPageCMS.java | 2 +- .../runners/TestRunnerDashboardHRM.java | 24 +++++-------- .../runners/TestRunnerSigninCRM.java | 24 +++++-------- 4 files changed, 20 insertions(+), 65 deletions(-) diff --git a/pom.xml b/pom.xml index e7a1754..897c915 100644 --- a/pom.xml +++ b/pom.xml @@ -20,10 +20,9 @@ 7.18.0 28.0.0 - 5.7.5 + 5.8.0 4.21.0 7.10.2 - 5.6.3 1.9.22.1 2.23.1 2.27.0 @@ -134,19 +133,6 @@ ${extentreports-cucumber7-adapter.version} - - - - - - - - - - - - - io.qameta.allure @@ -439,25 +425,6 @@ - - tech.grasshopper - cucumber-pdf-plugin - 1.14.0 - - - report - test - - pdfreport - - - - - target/cucumber-reports - reports/CucumberReports/cucumber-reports - - - org.apache.maven.plugins maven-javadoc-plugin diff --git a/src/test/java/com/anhtester/projects/website/cms/pages/CommonPageCMS.java b/src/test/java/com/anhtester/projects/website/cms/pages/CommonPageCMS.java index 3915002..c897b71 100644 --- a/src/test/java/com/anhtester/projects/website/cms/pages/CommonPageCMS.java +++ b/src/test/java/com/anhtester/projects/website/cms/pages/CommonPageCMS.java @@ -10,7 +10,7 @@ public class CommonPageCMS { public void verifyDashboardPageDisplays() { waitForPageLoaded(); - verifyContains(getCurrentUrl(), "/anhtester", "The URL not match."); + verifyContains(getCurrentUrl(), "/admin", "The URL not match."); verifyElementPresent(menuProducts, 5, "Login failed. The Dashboard page not displays."); } diff --git a/src/test/java/com/anhtester/runners/TestRunnerDashboardHRM.java b/src/test/java/com/anhtester/runners/TestRunnerDashboardHRM.java index 730061d..86c5a7e 100644 --- a/src/test/java/com/anhtester/runners/TestRunnerDashboardHRM.java +++ b/src/test/java/com/anhtester/runners/TestRunnerDashboardHRM.java @@ -12,15 +12,19 @@ @Test @CucumberOptions( features = "src/test/resources/features/Dashboard.feature", - glue = {"com.anhtester.projects.website.crm.stepdefinitions", - "com.anhtester.hooks"}, - plugin = {"com.anhtester.hooks.CucumberListener", + glue = { + "com.anhtester.projects.website.crm.stepdefinitions", + "com.anhtester.hooks" + }, + plugin = { + "com.anhtester.hooks.CucumberListener", "pretty", "html:target/cucumber-reports/TestRunnerDashboardHRM.html", "json:target/cucumber-reports/TestRunnerDashboardHRM.json", "io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm", - "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} - , monochrome = true, + "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" + }, + monochrome = true, tags = "@Regression or @Smoke" ) @@ -30,14 +34,4 @@ public class TestRunnerDashboardHRM extends AbstractTestNGCucumberTests { public Object[][] scenarios() { return super.scenarios(); } - - @AfterSuite - public void afterSuite() { - System.out.println("================ AFTER SUITE ================"); - ZipUtils.zipReportFolder(); - EmailSendUtils.sendEmail(CucumberListener.count_totalTCs - , CucumberListener.count_passedTCs - , CucumberListener.count_failedTCs - , CucumberListener.count_skippedTCs); - } } diff --git a/src/test/java/com/anhtester/runners/TestRunnerSigninCRM.java b/src/test/java/com/anhtester/runners/TestRunnerSigninCRM.java index 6cd3fc3..d71b5b0 100644 --- a/src/test/java/com/anhtester/runners/TestRunnerSigninCRM.java +++ b/src/test/java/com/anhtester/runners/TestRunnerSigninCRM.java @@ -12,15 +12,19 @@ @Test @CucumberOptions( features = "src/test/resources/features/SigninCRM.feature", - glue = {"com.anhtester.projects.website.crm.stepdefinitions", - "com.anhtester.hooks"}, - plugin = {"com.anhtester.hooks.CucumberListener", + glue = { + "com.anhtester.projects.website.crm.stepdefinitions", + "com.anhtester.hooks" + }, + plugin = { + "com.anhtester.hooks.CucumberListener", "pretty", "html:target/cucumber-reports/TestRunnerSigninCRM.html", "json:target/cucumber-reports/TestRunnerSigninCRM.json", "io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm", - "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} - , monochrome = true, + "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" + }, + monochrome = true, tags = "@Regression or @Smoke" ) @@ -30,14 +34,4 @@ public class TestRunnerSigninCRM extends AbstractTestNGCucumberTests { public Object[][] scenarios() { return super.scenarios(); } - - @AfterSuite - public void afterSuite() { - System.out.println("================ AFTER SUITE ================"); - ZipUtils.zipReportFolder(); - EmailSendUtils.sendEmail(CucumberListener.count_totalTCs - , CucumberListener.count_passedTCs - , CucumberListener.count_failedTCs - , CucumberListener.count_skippedTCs); - } }