Class DBBaseStepDefinition


  • public class DBBaseStepDefinition
    extends Object
    The type JDBC base step definition.
    Author:
    Elan Thangamani
    • Constructor Detail

      • DBBaseStepDefinition

        public DBBaseStepDefinition()
    • Method Detail

      • loadAllDataSource

        public static void loadAllDataSource()
      • before

        public void before​(io.cucumber.java.Scenario scenario)
        Before.
        Parameters:
        scenario - the scenario
      • dummyGiven

        @Given("as a user perform query (.*) action$") @Given("as a user perform sql (.*) action$")
        public void dummyGiven​(String dummy)
                        throws Exception
        given sql.
        Parameters:
        dummy - the dummy
        Throws:
        Exception - the exception
      • insertSql

        @Given("execute DDL for the given query (.*) on (.*)$") @Given("execute UPDATE for the given query (.*) on (.*)$") @Given("execute DELETE for the given query (.*) on (.*)$") @Given("execute INSERT for the given query (.*) on (.*)$") @Given("execute DDL for the given sql (.*) on (.*)$") @Given("execute UPDATE for the given (.*) on (.*)$") @Given("execute DELETE for the given (.*) on (.*)$") @Given("execute INSERT for the given (.*) on (.*)$")
        public void insertSql​(String dummy,
                              String resource,
                              List<String> sqls)
                       throws Exception
        Insert sql.
        Parameters:
        dummy - the dummy
        resource - the resource
        sqls - the sqls
        Throws:
        Exception - the exception
      • modifyBooleanVariable

        @Given("^perform-db the (.*) condition to skip scenario")
        public void modifyBooleanVariable​(String condition)
                                   throws Exception
        perform the skip scenario
        Parameters:
        condition - the response value excel based
        Throws:
        IOException - the io exception
        Exception
      • storeSqlResponseAskeySwap

        @Given("^store (.*) as key and query\'s (.*) as value")
        public void storeSqlResponseAskeySwap​(String key,
                                              String responseKey)
                                       throws org.json.JSONException
        Throws:
        org.json.JSONException
      • storeSqlResponseAskey

        @Given("^store-sql\'s (.*) value of the key as (.*)")
        public void storeSqlResponseAskey​(String responseKey,
                                          String key)
                                   throws org.json.JSONException
        Throws:
        org.json.JSONException
      • verify

        @Given("verify (.*) with the given sql (.*) on (.*)$") @Given("validate (.*) given (.*) on (.*)$")
        public void verify​(String dummy1,
                           String dummy,
                           String resource,
                           List<String> selectSql)
                    throws Exception
        Verify.
        Parameters:
        dummy1 - the dummy 1
        dummy - the dummy
        resource - the resource
        selectSql - the select sql
        Throws:
        Exception - the exception
      • select

        @Given("select (.*) with the given sql (.*) on (.*)$") @Given("read (.*) given (.*) on (.*)$")
        public void select​(String dummy1,
                           String dummy,
                           String resource,
                           List<String> selectSql)
                    throws Exception
        SELECT.
        Parameters:
        dummy1 - the dummy 1
        dummy - the dummy
        resource - the resource
        selectSql - the select sql
        Throws:
        Exception - the exception