def TestCase_941(self, rid): #MULTI CLIENT CONNECTIVITY staConnect = StaConnect("10.10.10.201", 8080, _debugOn=False) staConnect.sta_mode = 0 staConnect.upstream_resource = 1 staConnect.upstream_port = "eth2" staConnect.radio = "wiphy1" staConnect.resource = 1 staConnect.dut_ssid = "autoProvisionedSsid-5u" # staConnect.dut_passwd = "4C0nnectUS!" staConnect.dut_passwd = "[BLANK]" staConnect.dut_security = "open" staConnect.station_names = ["sta0020", 'sta0021', 'sta0022', 'sta0023'] staConnect.runtime_secs = 30 staConnect.cleanup_on_exit = False staConnect.run() run_results = staConnect.get_result_list() for result in run_results: print("test result: " + result) if staConnect.passes() == True: client.update_testrail( case_id=941, run_id=rid, status_id=1, msg='client Connectivity to 5GHZ Open SSID is Passed ') else: client.update_testrail( case_id=941, run_id=rid, status_id=5, msg='client connectivity to 5GHZ OPEN SSID is Failed')
def TestCase_938(self, rid): '''SINGLE CLIENT CONNECTIVITY''' staConnect = StaConnect("10.10.10.201", 8080, _debugOn=False) staConnect.sta_mode = 0 staConnect.upstream_resource = 1 staConnect.upstream_port = "eth2" staConnect.radio = "wiphy1" staConnect.resource = 1 staConnect.dut_ssid = "autoProvisionedSsid-5u" #staConnect.dut_passwd = "4C0nnectUS!" staConnect.dut_passwd = "12345678" staConnect.dut_security = "wpa2" staConnect.station_names = ["sta01010"] staConnect.runtime_secs = 30 staConnect.cleanup_on_exit = True staConnect.run() run_results = staConnect.get_result_list() for result in run_results: print("test result: " + result) #result = 'pass' print("Single Client Connectivity :",staConnect.passes) if staConnect.passes() == True: client.update_testrail(case_id=938, run_id=rid, status_id=1, msg='client Connectivity to 5GHZ Open SSID is Passed ') else: client.update_testrail(case_id=938, run_id=rid, status_id=5, msg='client connectivity to 5GHZ OPEN SSID is Failed')
def main(): staConnect = StaConnect("localhost", 8080, _debugOn=False) staConnect.sta_mode = 0 staConnect.upstream_resource = 1 staConnect.upstream_port = "eth2" staConnect.radio = "wiphy0" staConnect.resource = 1 staConnect.dut_security = sta_connect.WPA2 staConnect.dut_ssid = "Default-SSID-2g" staConnect.dut_passwd = "12345678" staConnect.station_names = [ "sta000" ] staConnect.setup() staConnect.start() time.sleep(20) staConnect.stop() staConnect.finish() staConnect.cleanup() is_passing = staConnect.passes() if is_passing == False: # run_results = staConnect.get_failed_result_list() fail_message = staConnect.get_fail_message() print("Some tests failed:\n" + fail_message) else: print("Tests pass")