Skip to content

Commit

Permalink
Fix screenshot step passed and all steps in report
Browse files Browse the repository at this point in the history
  • Loading branch information
vothaian committed May 21, 2024
1 parent 685dde3 commit 5ad5bed
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 65 deletions.
35 changes: 1 addition & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@

<cucumber.java.version>7.18.0</cucumber.java.version>
<gherkin.version>28.0.0</gherkin.version>
<cucumber-reporting.version>5.7.5</cucumber-reporting.version>
<cucumber-reporting.version>5.8.0</cucumber-reporting.version>
<selenium.version>4.21.0</selenium.version>
<testng.version>7.10.2</testng.version>
<webdrivermanager.version>5.6.3</webdrivermanager.version>
<aspectjweaver.version>1.9.22.1</aspectjweaver.version>
<log4j.version>2.23.1</log4j.version>
<allure-testng.version>2.27.0</allure-testng.version>
Expand Down Expand Up @@ -134,19 +133,6 @@
<version>${extentreports-cucumber7-adapter.version}</version>
</dependency>

<!-- <dependency>-->
<!-- <groupId>tech.grasshopper</groupId>-->
<!-- <artifactId>pdfextentreporter</artifactId>-->
<!-- <version>1.3.2</version>-->
<!-- </dependency>-->

<!-- &lt;!&ndash; https://mvnrepository.com/artifact/tech.grasshopper/extent-pdf-report &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>tech.grasshopper</groupId>-->
<!-- <artifactId>extent-pdf-report</artifactId>-->
<!-- <version>2.12.0</version>-->
<!-- </dependency>-->

<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber7-jvm -->
<dependency>
<groupId>io.qameta.allure</groupId>
Expand Down Expand Up @@ -439,25 +425,6 @@
</executions>
</plugin>

<plugin>
<groupId>tech.grasshopper</groupId>
<artifactId>cucumber-pdf-plugin</artifactId>
<version>1.14.0</version>
<executions>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>pdfreport</goal>
</goals>
</execution>
</executions>
<configuration>
<cucumberJsonReportDirectory>target/cucumber-reports</cucumberJsonReportDirectory>
<cucumberPdfReportDirectory>reports/CucumberReports/cucumber-reports</cucumberPdfReportDirectory>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

Expand Down
24 changes: 9 additions & 15 deletions src/test/java/com/anhtester/runners/TestRunnerDashboardHRM.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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);
}
}
24 changes: 9 additions & 15 deletions src/test/java/com/anhtester/runners/TestRunnerSigninCRM.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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);
}
}

0 comments on commit 5ad5bed

Please sign in to comment.