Class BaseGTest


  • public abstract class BaseGTest
    extends io.cucumber.testng.AbstractTestNGCucumberTests
    This is a custom implementation of AbstractTestNGCucumberTests for adding special configuration of GingerSpec to the CucumberOptions annotation of the class Test classes must extend this class in order to be executed with TestNG and use the Gingerspec steps and other functionality
    Author:
    Jose Fernandez
    • Constructor Detail

      • BaseGTest

        public BaseGTest()
    • Method Detail

      • beforeGSuite

        @BeforeSuite(alwaysRun=true)
        public void beforeGSuite​(org.testng.ITestContext context)
      • afterGSuite

        @AfterSuite(alwaysRun=true)
        public void afterGSuite​(org.testng.ITestContext context)
        Method executed after a suite.
        Parameters:
        context - the context
      • setUpClass

        @BeforeClass(alwaysRun=true)
        public void setUpClass()
        Overrides the parent method AbstractTestNGCucumberTests.setUpClass() and executes custom code before the object is created
        Overrides:
        setUpClass in class io.cucumber.testng.AbstractTestNGCucumberTests
      • beforeGClass

        @BeforeClass(alwaysRun=true)
        public void beforeGClass​(org.testng.ITestContext context)
        Method executed before a test class.
        Parameters:
        context - the context
      • beforeGMethod

        @BeforeMethod(alwaysRun=true)
        public void beforeGMethod​(Method method)
        Method executed after a test method.
        Parameters:
        method - the method
      • afterGMethod

        @AfterMethod(alwaysRun=true)
        public void afterGMethod​(Method method)
        Method executed before method.
        Parameters:
        method - the method
      • afterGClass

        @AfterClass
        public void afterGClass()
        Method executed before a class.