def my_test_suite(): # Initialize logging init_logging() # Initialize parameter dictionary - may be a better approach to loading parameters params = cafe.Param({}) if not cafe.executing_in_runner(): # Get runner config file cafe.load_config_file("config/config.ini") # Test suite parameter file params.load_ini("params/ts_demo_e7_connection.ini") # Test bed topology information imported here - may be a better approach to loading topology topology = cafe.get_topology() topology.load(params.topology.file) # Open Sessions Needed for Test Suite open_sessions(params, topology) # Test cases must be registered with Cafe prior to execution cafe.register_test_case(tc_demo.tc_123_e7_command_test, args=[params]) # Execute all registered test cases cafe.run_test_cases() # Close Sessions Needed for Test Suite close_sessions(params, topology)
def ts_wifi_security(): # Initialize logging init_logging() params = cafe.Param({}) # TODO Modify to take filename directly from cafe config file params.load_ini("params/800E/ts_wifi_security_800E_24g.ini") # params.load_ini("params/800GH/ts_wifi_security_800GH_24g.ini") #params.load_ini("params/800G/ts_wifi_security_854G_5g.ini") #params.load_ini("params/800G/ts_wifi_security_844G_5g.ini") # print "params : ", params # Test bed topology information imported here (No topology needed at this time) # topology = cafe.get_topology() # topology.load(params.topology.file) # print "topology : ", topology # Open Sessions Needed for Test Suite open_sessions(params) # TMS Global IDs are made up of <Contour_Global_ID><Contour_User_Interface><EUT> idadd = params['testaccounting']['ui'] + params['testaccounting']['eut'] if params['execution']['radiotype'] == "2.4GHz": # 2.4GHz Test Case Execution cafe.register_test_case(tc_wifi_security.tc_675201_24g_base_ssid_default_security, test_id="675201" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_675202_24g_base_ssid_custom_key, test_id="675202" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_675203_24g_guest_opertor_ssid_default_security_key, test_id="675203" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_675204_24g_base_guest_ssid_custom_security_key, test_id="675204" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_675209_24g_base_guest_ssid_security_off, test_id="675209" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_675210_24g_base_guest_ssid_security_wpawpa2_enc_both, test_id="675210" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_675211_24g_base_guest_ssid_security_wpawpa2_enc_aes, test_id="675211" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_675212_24g_base_guest_ssid_security_wpawpa2_enc_tkip, test_id="675212" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_1019101_24g_base_guest_ssid_security_wpa2_enc_aes, test_id="1019101" + idadd, args=[params]) if params['execution']['radiotype'] == "5GHz": # 5GHz Test Case Execution cafe.register_test_case(tc_wifi_security.tc_981722_5g_base_ssid_default_security, test_id="981722" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_981707_5g_base_ssid_custom_key, test_id="981707" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_981708_5g_guest_opertor_ssid_default_security_key, test_id="981708" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_981709_5g_base_guest_ssid_custom_security_key, test_id="981709" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_981711_5g_base_guest_ssid_security_off, test_id="981711" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_981713_5g_base_guest_ssid_security_wpawpa2_enc_aes, test_id="981713" + idadd, args=[params]) cafe.register_test_case(tc_wifi_security.tc_1020703_5g_base_guest_ssid_security_wpa2_enc_aes, test_id="1020703" + idadd, args=[params]) # Execute test cases cafe.run_test_cases() # Close Sessions Needed for Test Suite close_sessions(params)
def remove_topology(): """ Description: Remove topology connections required for test suite. All session control within function. Args: Returns: """ # Obtain parameter file information param = cafe.Param({}) # TODO Modify to take filename directly from cafe config file param.load_ini( "/opt/home/glivermo/stp/stp/test_beds/sandbox/ts_xconn_demo_parms.ini") print("param :", param)
def xconn_demo_test_suite(): # Initialize logging init_logging() # Start session manager # sm = cafe.get_session_manager() # Obtain test suite parameter file information # params = cafe.get_test_param() # params.reset() # cafe.load_ts_config(cafe.get_cfs().abspath("params/ts_xconn_demo_parms.ini")) params = cafe.Param({}) # TODO Modify to take filename directly from cafe config file params.load_ini("params/ts_xconn_demo_parms.ini") print("params : ", params) # Test bed topology information imported here topology = cafe.get_topology() # print("topo file : ",params['Topology']) topology.load(params.topology.file) # Start session manager params.session_mgr = session_mgr = cafe.get_session_manager() # Open Sessions Needed for Test Suite open_sessions(params, topology) # Register Test cases # cafe.register_test_case(e7gui_test_case, args=[params]) cafe.register_test_case(e7guifailure_test_case, args=[params]) # cafe.register_test_case(ixveriwave_test_case, args=[params]) # cafe.register_test_case(ixveriwave_buildfile, args=[params]) # cafe.register_test_case(e7_test_case, args=[dut2]) # Execute test cases cafe.run_test_cases() # Close Sessions Needed for Test Suite close_sessions(params, topology)
def ts_ssid_isolation(): # Initialize logging init_logging() params = cafe.Param({}) # TODO Modify to take filename directly from cafe config file params.load_ini("params/800E/ts_wifi_ssid_isolation_800E_24g.ini") # params.load_ini("params/800G/ts_wifi_ssid_isolation_800G_24g.ini") # params.load_ini("params/800GH/ts_wifi_ssid_isolation_800GH_24g.ini") # params.load_ini("params/800G/ts_wifi_ssid_isolation_854G_5g.ini") # params.load_ini("params/800G/ts_wifi_ssid_isolation_844G_5g.ini") # print "params : ", params # Test bed topology information imported here topology = cafe.get_topology() topology.load(params.topology.file) # print "topology : ", topology # Build XConnect # TODO: Complete development on building E7 XConnect # Open Sessions Needed for Test Suite open_sessions(params, topology) # TMS Global IDs are made up of <Contour_Global_ID><Contour_User_Interface><EUT> idadd = params['testaccounting']['ui'] + params['testaccounting']['eut'] # If a GPON ONT need to configure WAN uplink through E7 if str(params['execution']['isdutgponont']).lower() == "yes": cafe.register_test_case( tc_wifi_ssid_isolation.gpon_ont_build_e7_provisioning, args=[params]) # If an Ethernet only ONT need to configure Use Case uplink through E7 for WAN connection if str(params['execution']['isdutgponont']).lower() == "no": cafe.register_test_case( tc_wifi_ssid_isolation.enet_ont_build_e7_provisioning, args=[params]) if params['execution']['radiotype'] == "2.4GHz": # 2.4GHz Test Case Execution cafe.register_test_case( tc_wifi_ssid_isolation.tc_546796_24g_primary_ssid_lan_isolation, test_id="546796" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation.tc_546797_24g_primary_ssid_wan_isolation, test_id="546797" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation.tc_546798_24g_primary_ssid_intra_isolation, test_id="546798" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546799_24g_primary_ssid_nonprimary_ssid_isolation_nosubnet, test_id="546799" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546800_24g_primary_ssid_nonprimary_ssid_isolation_subnet, test_id="546800" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546801_24g_primary_ssid_nonprimary_ssid_isolation_subnetandintra, test_id="546801" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546803_24g_nonprimary_ssid_lan_isolationdisabled, test_id="546803" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546804_24g_nonprimary_ssid_lan_isolationenabled, test_id="546804" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546805_24g_nonprimary_ssid_wan_isolationenabled, test_id="546805" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546806_24g_nonprimary_ssid_wan_isolationenabled, test_id="546806" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546807_24g_nonprimary_ssid_intra_isolationdisabled, test_id="546807" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546808_24g_nonprimary_ssid_intra_isolationenabled, test_id="546808" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546809_24g_two_nonprimary_ssid_bothinterisolationdisabled, test_id="546809" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546810_24g_two_nonprimary_ssid_bothinterisolationenabled, test_id="546810" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546811_24g_two_nonprimary_ssid_differentinterisolation, test_id="546811" + idadd, args=[params]) if params['execution']['radiotype'] == "5GHz": # 5GHz Test Case Execution cafe.register_test_case( tc_wifi_ssid_isolation.tc_546775_5g_primary_ssid_lan_isolation, test_id="546775" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation.tc_546776_5g_primary_ssid_wan_isolation, test_id="546776" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation.tc_546777_5g_primary_ssid_intra_isolation, test_id="546777" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546778_5g_primary_ssid_nonprimary_ssid_isolation_nosubnet, test_id="546778" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546779_5g_primary_ssid_nonprimary_ssid_isolation_subnet, test_id="546779" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546782_5g_nonprimary_ssid_lan_isolationdisabled, test_id="546782" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546783_5g_nonprimary_ssid_lan_isolationenabled, test_id="546783" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546784_5g_nonprimary_ssid_wan_isolationenabled, test_id="546784" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546785_5g_nonprimary_ssid_wan_isolationenabled, test_id="546785" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546786_5g_nonprimary_ssid_intra_isolationdisabled, test_id="546786" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546787_5g_nonprimary_ssid_intra_isolationenabled, test_id="546787" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546788_5g_two_nonprimary_ssid_bothinterisolationdisabled, test_id="546788" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546789_5g_two_nonprimary_ssid_bothinterisolationenabled, test_id="546789" + idadd, args=[params]) cafe.register_test_case( tc_wifi_ssid_isolation. tc_546790_5g_two_nonprimary_ssid_differentinterisolation, test_id="546790" + idadd, args=[params]) if str(params['execution']['isdutgponont']).lower() == "yes": cafe.register_test_case( tc_wifi_ssid_isolation.gpon_ont_remove_e7_provisioning, args=[params]) if str(params['execution']['isdutgponont']).lower() == "no": cafe.register_test_case( tc_wifi_ssid_isolation.enet_ont_remove_e7_provisioning, args=[params]) # Execute test cases cafe.run_test_cases() # Close Sessions Needed for Test Suite close_sessions(params, topology)
def ts_wifi_performance(): # Initialize logging init_logging() params = cafe.Param({}) # TODO Modify to take filename directly from cafe config file #params.load_ini("params/800E/ts_wifi_performance_800E_24g.ini") #params.load_ini("params/noncalix/buffalo_performance_24g.ini") #params.load_ini("params/noncalix/bcomreference_performance_24g.ini") #params.load_ini("params/noncalix/bcomreference_performance_5g.ini") #params.load_ini("params/800G/ts_wifi_performance_854G_5g.ini") params.load_ini("params/800G/ts_wifi_performance_844G_5g.ini") # print "params : ", params # Test bed topology information imported here (No topology needed at this time) # topology = cafe.get_topology() # topology.load(params.topology.file) # print "topology : ", topology if 'iscalix' in params['globalsettings']: if str(params['globalsettings']['iscalix']).lower() == 'false': iscalix = False else: iscalix = True else: iscalix = True # Open Sessions Needed for Test Suite open_sessions(params, iscalix) # TMS Global IDs are made up of <Contour_Global_ID><Contour_User_Interface><EUT> idadd = params['testaccounting']['ui'] + params['testaccounting']['eut'] if params['globalsettings']['radiotype'] == "2.4GHz": # 2.4GHz Test Case Execution if iscalix: cafe.register_test_case( tc_wifi_performance.tc_1041201_24g_centurylink_frsize_lan2wifi, test_id="1041201" + idadd, args=[params]) #cafe.register_test_case(tc_wifi_performance.tc_1041204_24g_centurylink_frsize_wifi2lan(, test_id="1041204" + idadd, args=[params]) #cafe.register_test_case(tc_wifi_performance.tc_1041203_24g_centurylink_frsize_wifilanbidirectional, test_id="1041203" + idadd, args=[params]) else: cafe.register_test_case( tc_wifi_performance. tc_noncalix_24g_centurylink_frsize_lan2wifi, test_id="noncalix" + idadd, args=[params]) if params['globalsettings']['radiotype'] == "5GHz": # 5GHz Test Case Execution if iscalix: cafe.register_test_case( tc_wifi_performance.tc_1041311_5g_centurylink_frsize_lan2wifi, test_id="1041311" + idadd, args=[params]) cafe.register_test_case( tc_wifi_performance.tc_1041312_5g_centurylink_frsize_wifi2lan, test_id="1041312" + idadd, args=[params]) cafe.register_test_case( tc_wifi_performance. tc_1041313_5g_centurylink_frsize_wifilanbidirectional, test_id="1041313" + idadd, args=[params]) cafe.register_test_case( tc_wifi_performance. tc_1065801_5g_centurylink_multiclients_lan2wifi, test_id="1065801" + idadd, args=[params]) cafe.register_test_case( tc_wifi_performance. tc_1065901_5g_centurylink_multiclients_wifi2lan, test_id="1065901" + idadd, args=[params]) cafe.register_test_case( tc_wifi_performance. tc_1065802_5g_centurylink_multiclientsssids_lan2wifi, test_id="1065802" + idadd, args=[params]) cafe.register_test_case( tc_wifi_performance. tc_1065904_5g_centurylink_multiclientsssids_wifi2lan, test_id="1065904" + idadd, args=[params]) cafe.register_test_case( tc_wifi_performance. tc_1065902_5g_centurylink_multiclientsssids_wifilanbidirectional, test_id="1065902" + idadd, args=[params]) # cafe.register_test_case(tc_wifi_performance.tc_777_5g_maxclientscapacity, test_id="777" + idadd, args=[params]) else: cafe.register_test_case( tc_wifi_performance.tc_noncalix_5g_centurylink_frsize_lan2wifi, test_id="noncalix" + idadd, args=[params]) # Execute test cases cafe.run_test_cases() # Close Sessions Needed for Test Suite close_sessions(params, iscalix)
Description: Attempt to close sessions required for test suite. Args: params(dict) : Dictionary of test suite instance parameters topology(dict) : Dictionary of test suite equipment topology information Returns: """ params['ont_gui'].close() # Load config.ini file when not executing from command prompt - default location for written test suites if not cafe.executing_in_runner(): # Get runner config file cafe.load_config_file("config/config.ini") params = cafe.Param({}) params.load_ini("params/cdrouter.ini") # print("params : ", params) # Test bed topology information imported here topology = cafe.get_topology() topology.load(params.topology.file) #print("topology : ", topology) params.session_mgr = session_mgr = cafe.get_session_manager() open_session_xc(params, topology) open_session_e7(params, topology) open_session_cdr(params, topology)
def ts_wifi_radio(): # Initialize logging init_logging() params = cafe.Param({}) # TODO Modify to take filename directly from cafe config file params.load_ini("params/800E/ts_wifi_security_800E_24g.ini") # params.load_ini("params/800GH/ts_wifi_security_800GH_24g.ini") # params.load_ini("params/800G/ts_wifi_radio_854G_5g.ini") # params.load_ini("params/800G/ts_wifi_radio_844G_5g.ini") # print "params : ", params # Test bed topology information imported here (No topology needed at this time) # topology = cafe.get_topology() # topology.load(params.topology.file) # print "topology : ", topology # Open Sessions Needed for Test Suite open_sessions(params) # TMS Global IDs are made up of <Contour_Global_ID><Contour_User_Interface><EUT> idadd = params['testaccounting']['ui'] + params['testaccounting']['eut'] if params['execution']['radiotype'] == "2.4GHz": # 2.4GHz Test Case Execution cafe.register_test_case(tc_wifi_radio.tc_1052807_24g_radio_toggle, test_id="1052807" + idadd, args=[params]) cafe.register_test_case( tc_wifi_radio.tc_1052808_24g_80211n_bandwidth_toggle, test_id="1052808" + idadd, args=[params]) cafe.register_test_case( tc_wifi_radio.tc_665920_24g_80211bgn_client_phy, test_id="665920" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_665921_24g_80211gn_client_phy, test_id="665921" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_665922_24g_80211n_client_phy, test_id="665922" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_665923_24g_80211bg_client_phy, test_id="665923" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_665924_24g_80211g_client_phy, test_id="665924" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_665925_24g_80211b_client_phy, test_id="665925" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_1052810_24g_20mhz_channels, test_id="1052810" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_1052811_24g_40mhz_channels, test_id="1052811" + idadd, args=[params]) if params['execution']['radiotype'] == "5GHz": # 5GHz Test Case Execution - Country Code United States cafe.register_test_case( tc_wifi_radio.tc_1043401_5g_80211ac_bandwidth_toggle, test_id="1043401" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_1047001_5g_radio_toggle, test_id="1047001" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_665928_5g_80211ac_client_phy, test_id="665928" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_665929_5g_80211n_client_phy, test_id="665929" + idadd, args=[params]) cafe.register_test_case( tc_wifi_radio.tc_1047203_5g_80mhz_nondfs_channels, test_id="1047203" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_1047204_5g_80mhz_dfs_channels, test_id="1047204" + idadd, args=[params]) cafe.register_test_case( tc_wifi_radio.tc_1047205_5g_40mhz_nondfs_channels, test_id="1047205" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_1047206_5g_40mhz_dfs_channels, test_id="1047206" + idadd, args=[params]) cafe.register_test_case( tc_wifi_radio.tc_1047207_5g_20mhz_nondfs_channels, test_id="1047207" + idadd, args=[params]) cafe.register_test_case(tc_wifi_radio.tc_1047208_5g_20mhz_dfs_channels, test_id="1047208" + idadd, args=[params]) cafe.register_test_case( tc_wifi_radio.tc_1047701_5g_80mhz_toggle_channels, test_id="1047701" + idadd, args=[params]) # Execute test cases cafe.run_test_cases() # Close Sessions Needed for Test Suite close_sessions(params)