def run(self, context): """ Runs the test step :type context: TestStepContext :param context: test case context """ TestStepBase.run(self, context) protocol = self._pars.bt_protocol device = DeviceManager().get_device(self._pars.device) # Read the throughput targets throughput_targets = ConfigsParser("BT_Throughput_Targets").parse_bt_targets(device.get_phone_model(), protocol) if self._pars.direction in "up": throughput_target = throughput_targets.ul_target throughput_failure = throughput_targets.ul_failure else: throughput_target = throughput_targets.dl_target throughput_failure = throughput_targets.dl_failure context.set_info(self._pars.target_throughput+":TARGET_VALUE", throughput_target.value) context.set_info(self._pars.target_throughput+":TARGET_UNIT", str(throughput_target.unit)) context.set_info(self._pars.target_throughput+":FAILURE_VALUE", throughput_failure.value) context.set_info(self._pars.target_throughput+":FAILURE_UNIT", str(throughput_failure.unit))
def run(self, context): """ Runs the test step :type context: TestStepContext :param context: test case context """ TestStepBase.run(self, context) device = DeviceManager().get_device(self._pars.device) # Read the throughput targets throughput_targets = ConfigsParser("Wifi_Throughput_Targets").\ parse_wifi_targets(device.get_phone_model(), self._pars.standard, self._pars.wifi_security, self._pars.iperf_protocol, self._pars.bandwidth) if self._pars.direction in "up": throughput_target = throughput_targets.ul_target throughput_failure = throughput_targets.ul_failure else: throughput_target = throughput_targets.dl_target throughput_failure = throughput_targets.dl_failure context.set_info(self._pars.target_throughput + ":TARGET_VALUE", throughput_target.value) context.set_info(self._pars.target_throughput + ":TARGET_UNITS", str(throughput_target.unit)) context.set_info(self._pars.target_throughput + ":FAILURE_VALUE", throughput_failure.value) context.set_info(self._pars.target_throughput + ":FAILURE_UNITS", str(throughput_failure.unit))
def run(self, context): """ Runs the test step :type context: TestStepContext :param context: test case context """ TestStepBase.run(self, context) device = DeviceManager().get_device(self._pars.device) throughput_target_unit = ThroughputMeasure.KBPS_UNIT throughput_failure_unit = ThroughputMeasure.KBPS_UNIT # Read the throughput targets throughput_targets = ConfigsParser("Wifi_Direct_Throughput_Targets").\ parse_wifi_direct_targets(device.get_phone_model(), self._pars.iperf_protocol, self._pars.bandwidth) if self._pars.direction in "up": throughput_target_value = throughput_targets.ul_target_value throughput_failure_value = throughput_targets.ul_failure_value else: throughput_target_value = throughput_targets.dl_target_value throughput_failure_value = throughput_targets.dl_failure_value context.set_info(self._pars.target_throughput + ":TARGET_VALUE", throughput_target_value) context.set_info(self._pars.target_throughput + ":TARGET_UNIT", throughput_target_unit) context.set_info(self._pars.target_throughput + ":FAILURE_VALUE", throughput_failure_value) context.set_info(self._pars.target_throughput + ":FAILURE_UNIT", throughput_failure_unit)
def run(self, context): """ Runs the test step :type context: TestStepContext :param context: test case context """ TestStepBase.run(self, context) device = DeviceManager().get_device(self._pars.device) sta_throughput_target_unit = ThroughputMeasure.UNITS.KPS_UNIT sta_throughput_failure_unit = ThroughputMeasure.UNITS.KPS_UNIT p2p_throughput_target_unit = ThroughputMeasure.UNITS.KPS_UNIT p2p_throughput_failure_unit = ThroughputMeasure.UNITS.KPS_UNIT # Read the throughput targets sta_throughput_targets, p2p_throughput_targets = ConfigsParser("Wifi_MR_Throughput_Targets").\ parse_wifi_mr_targets(device.get_phone_model(), self._pars.standard_frequency, self._pars.bandwidth, self._pars.sta_direction, self._pars.sta_iperf_protocol, self._pars.p2p_direction, self._pars.p2p_iperf_protocol) if self._pars.sta_direction in "up": sta_throughput_target_value = sta_throughput_targets.ul_target sta_throughput_failure_value = sta_throughput_targets.ul_failure else: sta_throughput_target_value = sta_throughput_targets.dl_target sta_throughput_failure_value = sta_throughput_targets.dl_failure if self._pars.p2p_direction in "up": p2p_throughput_target_value = p2p_throughput_targets.ul_target p2p_throughput_failure_value = p2p_throughput_targets.ul_failure else: p2p_throughput_target_value = p2p_throughput_targets.dl_target p2p_throughput_failure_value = p2p_throughput_targets.dl_failure context.set_info(self._pars.target_throughput + ":STA_TARGET_VALUE", sta_throughput_target_value.value) context.set_info(self._pars.target_throughput + ":STA_TARGET_UNIT", sta_throughput_target_unit) context.set_info(self._pars.target_throughput + ":STA_FAILURE_VALUE", sta_throughput_failure_value.value) context.set_info(self._pars.target_throughput + ":STA_FAILURE_UNIT", sta_throughput_failure_unit) context.set_info(self._pars.target_throughput + ":P2P_TARGET_VALUE", p2p_throughput_target_value.value) context.set_info(self._pars.target_throughput + ":P2P_TARGET_UNIT", p2p_throughput_target_unit) context.set_info(self._pars.target_throughput + ":P2P_FAILURE_VALUE", p2p_throughput_failure_value.value) context.set_info(self._pars.target_throughput + ":P2P_FAILURE_UNIT", p2p_throughput_failure_unit)
def run(self, context): """ Runs the test step :type context: TestStepContext :param context: test case context """ TestStepBase.run(self, context) device = DeviceManager().get_device(self._pars.device) # Read the connection targets connection_targets = ConfigsParser("Wifi_Connection_Targets").\ parse_wifi_connection_targets(device.get_phone_model()) context.set_info(self._pars.target_connection+":TARGET_VALUE", connection_targets.connection_target_value) context.set_info(self._pars.target_connection+":TARGET_UNIT", connection_targets.connection_unit) context.set_info(self._pars.target_connection+":FAILURE_VALUE", connection_targets.connection_failure_value) context.set_info(self._pars.target_connection+":FAILURE_UNIT", connection_targets.connection_unit)