Class HookGSpec

    • Constructor Detail

      • HookGSpec

        public HookGSpec​(CommonG spec)
        Default constructor.
        Parameters:
        spec - commonG object
    • Method Detail

      • globalSetup

        public void globalSetup()
        Clean the exception list before each scenario.
      • seleniumSetup

        public void seleniumSetup()
                           throws Exception
        If the feature has the @web annotation, creates a new selenium web driver before each scenario
        Throws:
        MalformedURLException - MalformedURLException
        Exception
      • AppiumSetup

        public void AppiumSetup()
                         throws IOException
        If the feature has the @mobile annotation, creates a new Appium driver before each scenario
        Throws:
        MalformedURLException - MalformedURLException
        IOException
      • seleniumTeardown

        public void seleniumTeardown​(cucumber.api.Scenario scenario)
                              throws IOException
        If the feature has the @web or @mobile annotation, closes selenium web driver after each scenario is completed.
        Parameters:
        scenario - Instance of the scenario just executed
        Throws:
        IOException - The IOException
      • restClientSetup

        public void restClientSetup()
        If the feature has the @rest annotation, creates a new REST client before each scenario
      • restClientTeardown

        public void restClientTeardown()
        If the feature has the @rest annotation, closes the REST client after each scenario is completed
      • remoteSSHConnectionTeardown

        public void remoteSSHConnectionTeardown()
        Disconnect any remaining open SSH connection after each scenario is completed
      • sqlConnectionClose

        public void sqlConnectionClose()
                                throws Exception
        If the feature has the @sql annotation, closes any open connection to a database after each scenario is completed
        Throws:
        Exception - Exception