0

All classes which include test cases extend this "AbstractAcceptance" class

public class AbstractAcceptance {

protected WebDriver driver;

@BeforeSuite
public static void setupClass() {
    WebDriverManager.chromedriver().setup();
}

@BeforeTest
public void setupTest() {
    WebDriverManager.chromedriver().getDownloadedDriverPath();
    driver = new ChromeDriver();
    driver.manage().window().maximize();
}


@AfterTest
public void teardown() {
    if (driver != null) {
        driver.quit();
    }
}

}

I run test cases from here

<test name="Category">
    <classes>
        <class name="eu.testcases.CategoryTest"/>
    </classes>
</test>
<test name="Cuisine">
    <classes>
        <class name="eu.testcases.CuisinesTest"/>
    </classes>
</test>
<test name="Addons">
    <classes>
        <class name="eu.testcases.AddonsTest"/>
    </classes>
</test>
2
  • 1
    Welcome. Are you getting any errors? If so, can you add them? – Lee Jensen Jun 10 at 14:21
  • Can you show the import section – Youans Jun 10 at 14:35