Execution is stopped after @BeforeSuite before @BeforeMethod would be executed. I use (alwaysRun=true) in each cases. It doesn't execute another test cases from suite. I got error message:
Test ignored.
@BeforeMethod(alwaysRun=true)
public void launchBrowser() throws Exception
{
    browser = BrowserFactory.launch(BrowserType.CHROME);
    logger.info("Browser Launched");
}
@AfterMethod(alwaysRun=true)
public void closeBrowser() throws Exception
{
    browser.close();
}
@AfterSuite(alwaysRun=true)
public static void tearDown() throws Exception
{
    Reporter.generateReport();
    SDK.cleanup();
}
                Here, it looks like the case is mostly because of DataProvider. If you are using DataProvider and haven't set it up properly (like not returning proper 2D array, returning empty array etc) it will ignore the test method. So make sure your DataProvider is proper and run the test again.
I have faced the similar issue , and thought its a compiler issue/ Testng Issue. But there was a problem in the way I was using dataprovider . Better put a debugger pointer in DataProvider function and debug you would be able to find the issue.
Env : Java + SDK + IntelliJ
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With