def __init__(self): self.shishito_support = ShishitoSupport() self.api_token = self.shishito_support.get_opt('circleci_api_token') self.circle_username = self.shishito_support.get_opt( 'circleci_username') self.circle_project = self.shishito_support.get_opt('circleci_project') self.circle_branch = self.shishito_support.get_opt('circleci_branch')
def __init__(self, project_root=None, test_timestamp=None): self.project_root = project_root or ShishitoSupport().project_root self.current_folder = os.path.dirname(os.path.abspath(__file__)) self.timestamp = test_timestamp or time.strftime("%Y-%m-%d_%H-%M-%S") self.result_folder = os.path.join(self.project_root, 'results', self.timestamp)
def setup_class(self): # shishito / selenium support self.tc = ShishitoSupport().get_test_control() self.driver = self.tc.start_browser() self.ts = SeleniumTest(self.driver) self.etsy_host = os.environ['ETSY_HOST'] self.etsy_port = os.environ['ETSY_PORT'] self.etsy_url = 'http://' + self.etsy_host + ':' + self.etsy_port # etsy url - create sql script to update cfg with open(DB_DIR + "/tmp-etsy-location.sql", "w+") as f: f.write("INSERT INTO config (id, value) values ('etsy_host', '" + self.etsy_host + "');\n") f.write("INSERT INTO config (id, value) values ('etsy_port', '" + self.etsy_port + "');\n") self.run_sql(self, '00', 'clean_db_00') self.run_sql(self, '00', 'tmp-etsy-location') # restart node if call([BIN_DIR + '/restart_node']) != 0: raise Exception("Error: Node restart failed (" + BIN_DIR + "/restart_node)") sleep(2) # Set base URL - host taken from env. prod_host = os.environ[ 'PRODUCT_HOST'] if 'PRODUCT_HOST' in os.environ else '127.0.0.1' self.base_url = 'http://' + prod_host + '/'
def __init__(self, driver): self.driver = driver self.shishito_support = ShishitoSupport() self.base_url = self.shishito_support.get_opt('base_url') self.default_implicit_wait = int( self.shishito_support.get_opt('default_implicit_wait')) self.timeout = int(self.shishito_support.get_opt('timeout'))
def __init__(self): self.shishito_support = ShishitoSupport() # create control environment object control_env_obj = self.shishito_support.get_module('test_environment') self.test_environment = control_env_obj(self.shishito_support) self.drivers = []
def __init__(self): self.shishito_support = ShishitoSupport() self.email_address = self.shishito_support.get_opt('email_address') self.email_imap = self.shishito_support.get_opt('email_imap') self.email_password = self.shishito_support.get_opt('email_password') self.email_mailbox = self.shishito_support.get_opt('email_mailbox') self.mail = imaplib.IMAP4_SSL(self.email_imap) self.mail.login(self.email_address, self.email_password)
def setup_class(self): self.tc = ShishitoSupport().get_test_control() self.driver = self.tc.start_browser() self.ts = SeleniumTest(self.driver) self.welcome_guide = WelcomeGuide(self.driver) self.bottom_bar = BottomBar(self.driver) self.url_bar = UrlBar(self.driver) self.tabs_page = TabsPage(self.driver) self.main_page = MainPage(self.driver) self.bookmarks_page = BookmarksPage(self.driver) self.dashobard_page = DashboardPage(self.driver) self.history_page = HistoryPage(self.driver) self.test_url = "google.com"
def __init__(self, project_root): # set project root self.project_root = project_root # test timestamp - for storing results self.test_timestamp = time.strftime("%Y-%m-%d_%H-%M-%S") self.epoch = int(time.time()) # parse cmd args self.cmd_args = self.handle_cmd_args() # Get SUT build for use in reporting self.test_build = self.cmd_args['build'] self.reporter = Reporter(project_root, self.test_timestamp) self.shishito_support = ShishitoSupport(cmd_args=self.cmd_args, project_root=self.project_root)
def __init__(self, user, password, timestamp, epoch, build): self.shishito_support = ShishitoSupport() self.qastats_base_url = self.shishito_support.get_opt('qastats_url') self.user = user self.password = password self.timestamp = timestamp self.epoch = epoch self.build = build # project specific config self.project_id = self.shishito_support.get_opt('qastats_project_id') # shishito results self.reporter = Reporter() self.shishito_results = self.reporter.get_xunit_test_cases(timestamp) self.default_headers = {'Content-Type': 'application/json'} self.result_url = self.qastats_base_url + '/api/v1/results' self.project_url = self.shishito_support.get_opt('base_url')
def setup_class(self): # shishito / selenium support self.tc = ShishitoSupport().get_test_control() try: # Set base URL - host taken from env. prod_host = os.environ[ 'QA_PRODUCT_HOST'] if 'QA_PRODUCT_HOST' in os.environ else '127.0.0.1' prod_port = os.environ[ 'QA_WEB_HTTPS_PORT'] if 'QA_WEB_HTTPS_PORT' in os.environ else '80' login_host = os.environ[ 'QA_PRODUCT_HOST_AUTH'] if 'QA_PRODUCT_HOST_AUTH' in os.environ else prod_host self.base_url = 'https://' + prod_host + ':' + prod_port + '/' # Login URLs self.login_url_http = 'http://' + login_host + ':' + os.environ[ 'QA_AUTH_HTTP_PORT'] + '/' self.login_url_https = 'https://' + login_host + ':' + os.environ[ 'QA_AUTH_HTTPS_PORT'] + '/' self.web_api_url_https = 'https://' + prod_host + ':' + prod_port + '/api/v1/' except: print('*** setup_class failed ***') raise
def __init__(self, user, password, timestamp, build): self.shishito_support = ShishitoSupport() self.test_rail_instance = self.shishito_support.get_opt( 'test_rail_url') self.user = user self.password = password self.timestamp = timestamp # project specific config self.project_id = self.shishito_support.get_opt('test_rail_project_id') self.section_id = self.shishito_support.get_opt('test_rail_section_id') self.test_plan_id = self.shishito_support.get_opt( 'test_rail_test_plan_id') self.test_plan_name = self.shishito_support.get_opt( 'test_rail_test_plan_name') or build self.suite_id = self.shishito_support.get_opt('test_rail_suite_id') # shishito results self.reporter = Reporter() self.shishito_results = self.reporter.get_xunit_test_cases(timestamp) self.default_headers = {'Content-Type': 'application/json'} self.uri_base = self.test_rail_instance + '/index.php?/api/v2/'
def setup_class(self): self.tc = ShishitoSupport().get_test_control() self.driver = self.tc.start_browser() self.ts = SeleniumTest(self.driver)