def main_init(self):
        Log.log(Constants.MAIN_INIT_MESSAGE)
        #self.TEST_read_file_as_string()

        ############
        ## Run Here
        #my_run_service = RunService()
        #my_run_service.main_init()

        ############
        ## Tests
        #self.TEST_directory()
        #self.TEST_read_file_as_object()
        #self.TEST_write_to_new_file()
        #self.TEST_selenium_build()
        #self.TEST_remote_driver()
        #self.TEST_http_actions()
        #self.TEST_codex_object()
        #self.TEST_directory_lists()
        #self.TEST_shared_data_codex_test()
        #self.TEST_suite_directory()
        #self.TEST_suite_data()
        #self.TEST_regex_fix()
        #self.TEST_shared_data()
        #self.TEST_run_suite_by_name()
        #self.TEST_test_run_basic()
        #self.TEST_test_run_advanced()
        #self.TEST_data_converison()
        #self.TEST_data_converison_advanced()
        self.TEST_run_complete_action()
Esempio n. 2
0
 def run_list(self, method_list):
     for method_name in method_list:
         try:
             method_to_call = getattr(self, method_name)
             method_to_call()
         except Exception:
             Log.log(Constants.RUN_ERROR + Constants.SPACE_COLOGNE + method_name)
 def TEST_suite_data_directory(self):
     url_path = "Resources/WebData/SuiteFileGroups"
     directory_info_list = FileService.get_files_in_directory(url_path)
     updated_list = TextActions.append_prefix_to_string_list(url_path, directory_info_list)
     Log.log(updated_list)
     combined_list = FileService.get_joined_files_from_combined_directory_list(updated_list)
     Log.log(combined_list)
Esempio n. 4
0
    def run_action_init(self, test_number):
        Log.log(Constants.STARTING_TEST)

        ############################
        ## Get Context Object with WebDriver

        ############################
        ## Gets Test Data Array Here
        my_SuiteFileObject = self.the_MainProcessContextObject.get_my_suite_file_object(test_number)

        ############################
        ## Get Web Driver
        web_driver = self.the_MainProcessContextObject.get_web_driver()

        ############################
        ## Navigate To Start Page
        base_url = my_SuiteFileObject.get_base_url()
        #print ("base_url :: " + base_url)
        self.navigate_to_initial_url(web_driver, base_url)

        ############################
        ####convert Data
        my_command_data_class_array = my_SuiteFileObject.convert_to_command_data_class_array()

        ############################
        ## Run Test Here
        self.main_test_run_action(web_driver, my_command_data_class_array)
    def main_init(self):
        Log.log(Constants.MAIN_INIT_MESSAGE)
        #self.TEST_read_file_as_string()

        ############
        ## Run Here
        #my_run_service = RunService()
        #my_run_service.main_init()

        ############
        ## Tests
        #self.TEST_directory()
        #self.TEST_read_file_as_object()
        #self.TEST_write_to_new_file()
        #self.TEST_selenium_build()
        #self.TEST_remote_driver()
        #self.TEST_http_actions()
        #self.TEST_codex_object()
        #self.TEST_directory_lists()
        #self.TEST_shared_data_codex_test()
        #self.TEST_suite_directory()
        #self.TEST_suite_data()
        #self.TEST_regex_fix()
        #self.TEST_shared_data()
        #self.TEST_run_suite_by_name()
        #self.TEST_test_run_basic()
        #self.TEST_test_run_advanced()
        #self.TEST_data_converison()
        #self.TEST_data_converison_advanced()
        self.TEST_run_complete_action()
Esempio n. 6
0
    def run_action_init(self, test_number):
        Log.log(Constants.STARTING_TEST)

        ############################
        ## Get Context Object with WebDriver

        ############################
        ## Gets Test Data Array Here
        my_SuiteFileObject = self.the_MainProcessContextObject.get_my_suite_file_object(
            test_number)

        ############################
        ## Get Web Driver
        web_driver = self.the_MainProcessContextObject.get_web_driver()

        ############################
        ## Navigate To Start Page
        base_url = my_SuiteFileObject.get_base_url()
        #print ("base_url :: " + base_url)
        self.navigate_to_initial_url(web_driver, base_url)

        ############################
        ####convert Data
        my_command_data_class_array = my_SuiteFileObject.convert_to_command_data_class_array(
        )

        ############################
        ## Run Test Here
        self.main_test_run_action(web_driver, my_command_data_class_array)
Esempio n. 7
0
 def run_list(self, method_list):
     for method_name in method_list:
         try:
             method_to_call = getattr(self, method_name)
             method_to_call()
         except Exception:
             Log.log(Constants.RUN_ERROR + Constants.SPACE_COLOGNE +
                     method_name)
 def TEST_read_file_as_object(self):
     url_path = "Resources/test.json"
     with open(url_path) as json_file:
         input_object = json.load(json_file)
         new_data_shell = DataClassShell(**input_object)
         new_data = DataClass(**new_data_shell.get_data_class())
         new_name = new_data.get_name()
         Log.log(new_name)
 def TEST_read_file_as_object(self):
     url_path = "Resources/test.json"
     with open(url_path) as json_file:
         input_object = json.load(json_file)
         new_data_shell = DataClassShell(**input_object)
         new_data = DataClass(**new_data_shell.get_data_class())
         new_name = new_data.get_name()
         Log.log(new_name)
Esempio n. 10
0
 def api_command_consumption(self, the_command_data_object):
     api_name = the_command_data_object.get_current_command_api_name()
     #print("api_name :: " + api_name)
     if APIList.has_api(api_name):
         self.run_method_by_name(METHOD_PREFIX + api_name, the_command_data_object)
     else:
         Log.log(Constants.COMMAND_CASE_ERROR + Constants.SPACE_COLOGNE + str(api_name))
     the_command_data_object.set_current_command_number(the_command_data_object.get_current_command_number() + 1)
     return the_command_data_object.get_current_command_number()
 def TEST_suite_data_directory(self):
     url_path = "Resources/WebData/SuiteFileGroups"
     directory_info_list = FileService.get_files_in_directory(url_path)
     updated_list = TextActions.append_prefix_to_string_list(
         url_path, directory_info_list)
     Log.log(updated_list)
     combined_list = FileService.get_joined_files_from_combined_directory_list(
         updated_list)
     Log.log(combined_list)
Esempio n. 12
0
 def api_command_consumption(self, the_command_data_object):
     api_name = the_command_data_object.get_current_command_api_name()
     #print("api_name :: " + api_name)
     if APIList.has_api(api_name):
         self.run_method_by_name(METHOD_PREFIX + api_name,
                                 the_command_data_object)
     else:
         Log.log(Constants.COMMAND_CASE_ERROR + Constants.SPACE_COLOGNE +
                 str(api_name))
     the_command_data_object.set_current_command_number(
         the_command_data_object.get_current_command_number() + 1)
     return the_command_data_object.get_current_command_number()
 def TEST_codex_object(self):
     url_path = "Resources/WebData/Codex/GoogleCodex.json"
     string_data = FileService.get_object_from_path(url_path)
     Log.log(string_data)
     new_codex = FileService.convert_string_to_web_codex_action(string_data)
     new_name = new_codex.get_file_name()
     Log.log(new_name)
     Log.log(new_codex.to_json())
 def TEST_codex_object(self):
     url_path = "Resources/WebData/Codex/GoogleCodex.json"
     string_data = FileService.get_object_from_path(url_path)
     Log.log(string_data)
     new_codex = FileService.convert_string_to_web_codex_action(string_data)
     new_name = new_codex.get_file_name()
     Log.log(new_name)
     Log.log(new_codex.to_json())
 def TEST_directory(self):
     Log.log(Constants.CHROME_DRIVER_LOCATION_WIN)
 def TEST_directory(self):
     Log.log(Constants.CHROME_DRIVER_LOCATION_WIN)
Esempio n. 17
0
 def TEST_observer_service_action(self):
     Log.log(Constants.MESSAGE)
     self.the_action_service.TEST_action_service()
Esempio n. 18
0
 def TEST_observer_service_print(self):
     Log.log(Constants.OBSERVER_SERVICE_INIT_MESSAGE)
Esempio n. 19
0
 def TEST_action_service(self):
     Log.log(Constants.TEST)
     self.the_observer_service.TEST_observering_service_print()
 def TEST_read_file_as_string(self):
     url_path = "Resources/test.json"
     string_data = FileService.get_object_from_path(url_path)
     new_data = FileService.convert_string_to_data_class_action(string_data)
     new_name = new_data.get_name()
     Log.log(new_name)
 def TEST_http_actions(self):
     response_code = HttpActions.get_page_response_code('http://localhost:4444/grid/console/test')
     is_grid_running = GridActions.is_grid_running()
     Log.log(is_grid_running)
 def TEST_directory_lists(self):
     url_path = "Resources/WebData/Codex"
     directory_info = os.listdir(url_path)
     Log.log(directory_info)
 def TEST_read_file_as_string(self):
     url_path = "Resources/test.json"
     string_data = FileService.get_object_from_path(url_path)
     new_data = FileService.convert_string_to_data_class_action(string_data)
     new_name = new_data.get_name()
     Log.log(new_name)
 def TEST_http_actions(self):
     response_code = HttpActions.get_page_response_code(
         'http://localhost:4444/grid/console/test')
     is_grid_running = GridActions.is_grid_running()
     Log.log(is_grid_running)
 def TEST_directory_lists(self):
     url_path = "Resources/WebData/Codex"
     directory_info = os.listdir(url_path)
     Log.log(directory_info)