fix: 24 - adding CucumberFramework
jenkins/ZenProject/pipeline/head This commit looks good

This commit is contained in:
2024-10-03 17:38:00 -04:00
parent 9cb8ca125e
commit d13a89e735
9 changed files with 67 additions and 8 deletions
+5
View File
@@ -0,0 +1,5 @@
Feature: Home page of the application
Scenario: HomePage is landing Page
Given User is on landing page ( homePage )
When User type text into the text box and hit click
Then Text should be published
@@ -0,0 +1,23 @@
package stepDefinition;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
public class StepDefinition {
@Given("User is on landing page \\( homePage )")
public void userIsOnLandingPageHomePage() {
System.out.println("land on the home page");
}
@When("User type text into the text box and hit click")
public void userTypeTextIntoTheTextBoxAndHitClick() {
System.out.println("Navigate to the text bar, type, and submit your entry");
}
@Then("Text should be published")
public void textShouldBePublished() {
System.out.println("Assure your text is displayed");
}
}
@@ -0,0 +1,12 @@
package testNGRunner;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import io.cucumber.testng.CucumberOptions;
@CucumberOptions(
features = "src/main/java/features",
glue = "stepDefinition"
)
public class TestRunner extends AbstractTestNGCucumberTests {
}
@@ -18,6 +18,7 @@ import org.testng.annotations.Parameters;
public class Initialization {
// let's set up our variables
// private static ThreadLocal<WebDriver> driver = new ThreadLocal<>();
public static WebDriver driver;
public static Properties prop;
public static ExtentReports extent;
@@ -19,7 +19,6 @@ public class HomePage extends Initialization {
@FindBy(xpath = "//tbody/tr[1]/td[1]")
WebElement ConfirmText;
// Initialization
public HomePage() {
PageFactory.initElements(driver, this);
@@ -23,6 +23,7 @@ public class HomePageTest extends Initialization {
public void setUp(String browser) {
BrowserInit(browser);
homePage = new HomePage();
System.out.println("Starting " + browser);
}
@Test