def step_impl(context): for row in context.table: name = row.get('name') or "default" include_all = False if row.get('include all') and str(row.get('include all')) == "true": include_all = True BusAddNewRolePage.create_role(name,include_all=include_all) context.root_role_id = BusAddNewRolePage.get_role_id(name) BusPage.quit()
def step_impl(context): BusPage.click_client_configuration() BusPage.find_or_create_client_configuration(context.table[0].get('name'), context.table[0].get('type')) if context.table[0].get('encryption'): # BusPage.switch_to_tab("Preferences") BusPage.choose_encryption(context.table[0].get('encryption')) BusPage.enforce_encryption() BusPage.save_client_configuration()
def step_impl(context): context.execute_steps(unicode('When I log in BUS console')) # useremail = context.user.name or "" # if context.table == None: # pass # else: # if context.table[0].get('user_email'): # useremail = context.table[0].get('user_email') if context.table[0].get('user_email'): useremail = context.table[0].get('user_email') BusPage.search_user(useremail) BusPage.select_folder()
def step_impl(context): context.kpi = KPI(testcase=context.tc.name, category="Web", start_time=strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()), name="BUS Login", result="Fail", hostname=context.tc.machine_hostname, ip=context.tc.machine_ip, env=context.env) result = BusPage.visit() try: (result).should_not.be(False) except AssertionError: context.kpi.end_time = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()) context.kpi.message = "Can't access BUS." context.kpi.write_to_elasticsearch(context.senddb) context.kpi = None Page.quit() else: env = RUNNER_CONFIG.get('ENVIRONMENT') or 'QA12' username = GLOBAL_CONFIG.get('QA_ENVIRONMENT').get(env).get( 'bus_admin') password = GLOBAL_CONFIG.get('QA_ENVIRONMENT').get(env).get( 'bus_admin_password') result = BusPage.login(username, password) try: (result).should.be(True) except AssertionError: context.kpi.message = "Fail to Login BUS." Page.quit() else: context.kpi.result = "SUCCESS" finally: context.kpi.end_time = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()) context.kpi.write_to_elasticsearch(context.senddb) context.kpi = None
def step_impl(context): BusPage.openbrowser() # context.execute_steps(unicode('When I log web "BUS Login" KPI start time')) context.kpi = KPI(testcase=context.tc.name, category="Web", start_time=strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()), name="BUS Login", result="Fail", hostname=context.tc.machine_hostname, ip=context.tc.machine_ip, env=context.env) result = BusPage.visit() try: (result).should_not.be(False) except AssertionError: context.kpi.end_time = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()) context.kpi.result = "TIMEOUT" LogHelper.info(context.kpi.write_to_elasticsearch()) context.kpi = None
def step_impl(context): context.kpi = KPI(testcase=context.tc.name, category="Web", start_time=strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()), name="Frejya Response", result="Fail", hostname=context.tc.machine_hostname, ip=context.tc.machine_ip, env=context.env) result = BusPage.go_to_freya() try: (result).should.be(True) except AssertionError: context.kpi.message = "Fail to open Freyja." Page.quit() else: context.kpi.result = "SUCCESS" finally: context.kpi.end_time = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()) context.kpi.write_to_elasticsearch(context.senddb) context.kpi = None
def step_impl(context): username = context.user.username or "*****@*****.**" LogHelper.info('Search User %s' % username) # context.execute_steps(unicode('When I log web "BUS Search User" KPI start time')) context.kpi = KPI(testcase=context.tc.name, category="Web", start_time=strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()), name="BUS Search User", result="Fail", hostname=context.tc.machine_hostname, ip=context.tc.machine_ip, env=context.env) result = BusPage.search_user(username) try: (result).should.be(True) except AssertionError: context.kpi.message = "Fail to search user." Page.quit() else: context.kpi.result = "SUCCESS" finally: context.kpi.end_time = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime()) context.kpi.write_to_elasticsearch(context.senddb) context.kpi = None
def step_impl(context): # Goto Dashboard Page directly DashboardPage.visit() BusPage.search_partner(context.table[0].get('partner name')) BusPage.act_as_partner()
def step_impl(context): context.execute_steps(unicode('When I log in BUS console')) BusPage.search_partner(context.table[0].get('partner name')) BusPage.act_as_partner()
def step_impl(context): #context.execute_steps(unicode('When I log web "CAS Response" KPI start time')) BusPage.visit_cas()
def step_impl(context): BusPage.go_to_eDiscovery() Test_Data.clear_download_folder() FreyjaPage.define_lsh_search(context.table[0].get('keyword')) FreyjaPage.create_mzdx() FreyjaPage.close_browser()
def step_impl(context): DashboardPage.visit() BusPage.start_use_mozy()
def step_impl(context): context.multiencryption = False if context.table[0].get('multi_encryption'): context.multiencryption = True BusPage.click_client_configuration() BusPage.find_or_create_client_configuration(context.table[0].get('name'), context.table[0].get('type')) if context.table[0].get('encryption'): # BusPage.switch_to_tab("Preferences") BusPage.choose_encryption(context.table[0].get('encryption')) BusPage.uncheck_all_backup_sets(context.table[0].get('backup sets')) if context.table[0].get('user group'): BusPage.assign_user_group_to_configuration(context.table[0].get('user group')) BusPage.save_client_configuration()
def step_impl(context): BusReportBuilderPage(BusPage.bus_driver).create_report(context.table[0].get('report type')) BusReportBuilderPage(BusPage.bus_driver).save_report(context.table[0].get('report name')) BusPage.quit()
def step_impl(context): BusPage.openbrowser() BusPage.visit() BusPage.login()
def step_impl(context): BusPage.click_client_configuration() BusPage.find_or_create_client_configuration(context.table[0].get('name'), context.table[0].get('type')) BusPage.uncheck_all_backup_sets(context.table[0].get('backup sets')) if context.table[0].get('user group'): BusPage.assign_user_group_to_configuration(context.table[0].get('user group')) BusPage.save_client_configuration() BusPage.quit()