def __init__(self, tc_name, global_config): """ Constructor """ # Call LAB_HSPA_BASE Init function LabHspaBase.__init__(self, tc_name, global_config) # Read the DL_FILE value from UseCase xml Parameter self._dlfilename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("DL_FILENAME", "")) # Read the UL_FILE value from UseCase xml Parameter self._filename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("UL_FILENAME", "")) # Read the XFER_TIMEOUT from UseCase xml Parameter self._xfer_timeout = \ int(self._tc_parameters.get_param_value("XFER_TIMEOUT")) self._failure_targets = \ str(self._tc_parameters.get_param_value("FAILURE_TARGETS", "FUTE")) # Update the failure targets self._throughput_targets.set_failure_throughput_from_config(self._dut_config, self._failure_targets) # Log Throughput targets for HSPA self._logger.info(throughput_targets_string(self._throughput_targets)) self._ftp_api = self._device.get_uecmd("Ftp")
def __init__(self, tc_name, global_config): """ Constructor """ # Call LAB_HSPA_FTP Init function LabHspaFtp.__init__(self, tc_name, global_config) # Read the DL_FILE value from UseCase xml Parameter self._nb_transfer = self._tc_parameters.get_param_value( "NB_TRANSFER", 1, int) # Update the failure targets self._throughput_targets_8960 = copy.deepcopy(self._throughput_targets) self._throughput_targets_8960.set_failure_throughput_from_config( self._dut_config, "NFT") # Log Throughput targets for HSPA self._logger.info("OTA Throughput to reach on 8960: ") self._logger.info( throughput_targets_string(self._throughput_targets_8960)) self._measurement_duration = 10 self._wait_time_before_measure = 40 self._multi_ftp = MultipleFtpTransfer( self._nb_transfer, self._server_ip_address, self._direction, self._username, self._password, self._ns_DUT_IP_Address, self._ftp_api, self._filename, self._dlfilename, self._logger, self._xfer_timeout, self._throughput_targets.ul_failure.value, self._throughput_targets.dl_failure.value, self._device.binaries_path, self._device.binaries_path)
def __init__(self, tc_name, global_config): # Call LAB_WCDMA_BASE Init function LabWcdmaBase.__init__(self, tc_name, global_config) # Read Iperf PORT self._port = int(self._tc_parameters.get_param_value("PORT")) # Read Iperf measurement duration self._duration = \ int(self._tc_parameters.get_param_value("DURATION")) # Read Iperf protocol self._iperf_protocol = \ str(self._tc_parameters.get_param_value("IPERF_PROTOCOL", "TCP")) # Read Iperf TUNE OPTIONS self._tune_options = self._tc_parameters.get_param_value("IPERF_TUNE_OPTIONS", "0") if self._tune_options in (None, "", 0, '0', 'off', 'OFF'): self._tune_options = 0 else: self._tune_options = 1 # Get TCP window size and number of iperf client threads to run concurrently # window size > tput_to_reach * round_trip_time (700ms for WCDMA) # Iperf compute automatically the windows size. # It is better to not set a window size as result with iperf default size are pretty good self._iperf_uldl_parameters = retrieve_parameters_from_tc_params(self._tc_parameters) # Get computer type self._computer = self._tc_parameters.get_param_value("COMPUTER") # Get customized failure Targets self._failure_targets = \ str(self._tc_parameters.get_param_value("FAILURE_TARGETS", "")) if self._computer == "": self._computer = None # Load computer equipment if self._computer is not None: self._computer = self._em.get_computer(self._computer) # Update the failure targets self._throughput_targets.set_failure_throughput_from_config(self._dut_config, self._failure_targets) # Log Throughput targets for WCDMA self._logger.info(throughput_targets_string(self._throughput_targets)) # Set Iperf direction if self._direction in ("UL", "up", None): self._iperf_direction = "up" elif self._direction in ("DL", "down"): self._iperf_direction = "down" else: self._iperf_direction = "both"
def __init__(self, tc_name, global_config): LabHspaBase.__init__(self, tc_name, global_config) AnyUsbTether.__init__(self, tc_name, global_config) # if FTP transfer will be perform if self._perform_ftp: # Update the failure targets self._throughput_targets.set_failure_throughput_from_config( self._dut_config, self._failure_targets, self._kpi_test, tc_name._name) # Log Throughput targets for HSPA self._logger.info( throughput_targets_string(self._throughput_targets)) self._ns_data = self._ns_data_3g self._ns_cell = self._ns_cell_3g
def __init__(self, tc_name, global_config): """ Constructor """ # Call LAB_TDSCDMA_BASE Init function LabTdscdmaBase.__init__(self, tc_name, global_config) # Get FTP server parameters self._server = \ global_config.benchConfig.get_parameters("LAB_SERVER") self._server_ip_address = self._server.get_param_value("IP") self._username = self._server.get_param_value("username") self._password = self._server.get_param_value("password") if self._server.has_parameter("ftp_path"): self._ftp_path = self._server.get_param_value("ftp_path") else: self._ftp_path = "" # Read the DL_FILE value from UseCase xml Parameter self._dlfilename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("DL_FILENAME", "")) # Read the UL_FILE value from UseCase xml Parameter self._filename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("UL_FILENAME", "")) # Read the XFER_TIMEOUT from UseCase xml Parameter self._xfer_timeout = \ int(self._tc_parameters.get_param_value("XFER_TIMEOUT")) self._failure_targets = \ str(self._tc_parameters.get_param_value("FAILURE_TARGETS", "FUTE")) # Update the failure targets self._throughput_targets.set_failure_throughput_from_config( self._dut_config, self._failure_targets) # Log Throughput targets for TDSCDMA self._logger.info(throughput_targets_string(self._throughput_targets)) # FTP api self._ftp_api = self._device.get_uecmd("Ftp")
def __init__(self, tc_name, global_config): LabLteBase.__init__(self, tc_name, global_config) AnyUsbTether.__init__(self, tc_name, global_config) if self._perform_ftp: ###################################################### # LTE THROUGHPUT SETTINGS # ###################################################### self._set_lte_throughput_settings() # Update the failure targets self._throughput_targets.set_failure_throughput_from_config( self._dut_config, self._failure_targets, self._kpi_test, tc_name._name) # Log Throughput targets for LTE category self._logger.info( throughput_targets_string(self._throughput_targets)) # Initializing the variable which will contain the IP address to use. self._ip_address = None self._rrc_state = self._tc_parameters.get_param_value( "RRC_STATE", "RRC_CONNECTED")
def __init__(self, tc_name, global_config): """ Constructor """ # Call LAB_WCDMA_BASE Init function LabWcdmaBase.__init__(self, tc_name, global_config) # Read the DL_FILE value from UseCase xml Parameter self._dlfilename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("DL_FILENAME", "")) # Read the UL_FILE value from UseCase xml Parameter self._ulfilename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("UL_FILENAME", "")) # Read the XFER_TIMEOUT from UseCase xml Parameter self._xfer_timeout = \ int(self._tc_parameters.get_param_value("XFER_TIMEOUT")) # Get customized failure Targets self._failure_targets = \ str(self._tc_parameters.get_param_value("FAILURE_TARGETS", "FUTE")) # Update the failure targets self._throughput_targets.set_failure_throughput_from_config(self._dut_config, self._failure_targets) # Log Throughput targets for WCDMA self._logger.info(throughput_targets_string(self._throughput_targets)) # Initializing the variable which will contain the IP address to use. self._ip_address_list = [] self._ftp_api = self._device.get_uecmd("Ftp")
def __init__(self, tc_name, global_config): # Call LAB_HSPA_BASE Init function LabTdscdmaBase.__init__(self, tc_name, global_config) # Read Iperf PORT self._port = self._tc_parameters.get_param_value("PORT") if self._port in (None, "", "None"): # If no port are specified use a randomly generated port self._random_port = True else: self._port = int(self._port) self._random_port = False # Read Iperf measurement duration self._duration = \ int(self._tc_parameters.get_param_value("DURATION")) # Read Iperf protocol self._iperf_protocol = \ self._tc_parameters.get_param_value("IPERF_PROTOCOL", "TCP").lower() self._iperf_bandwidth = \ str(self._tc_parameters.get_param_value("IPERF_BANDWIDTH", None)).upper() # Get TCP window size and number of iperf client threads to run concurrently # window size > tput_to_reach * round_trip_time (200ms for HSPA) # Iperf compute automatically the windows size. # It is better to not set a window size as result with iperf default size are pretty good self._iperf_uldl_parameters = retrieve_parameters_from_tc_params( self._tc_parameters) # Get computer type self._computer_temp = self._tc_parameters.get_param_value( "COMPUTER", "IPERF_SERVER") # Get customized failure Targets self._failure_targets = \ str(self._tc_parameters.get_param_value("FAILURE_TARGETS", "")) # Detect if it is a KPI test or not self._kpi_test = self._tc_parameters.get_param_value( "KPI_TEST", False, "str_to_bool") if self._kpi_test: self._logger.info("It is a KPI test") self._kpi_data = None self._current_iteration = 0 # Read Iperf TUNE OPTIONS self._tune_options = self._tc_parameters.get_param_value( "IPERF_TUNE_OPTIONS", "0") if self._tune_options in (None, "", 0, '0', 'off', 'OFF'): self._tune_options = 0 else: self._tune_options = 1 # Load computer equipment if self._computer_temp is not None: self._computer = self._em.get_computer(self._computer_temp) self._computer_type = \ global_config.benchConfig.get_parameters(self._computer_temp) # Get server IP address self._server_ip_address = self._computer_type.get_param_value("IP") # Set Iperf direction if self._direction in ("UL", "up", None): self._iperf_direction = "up" elif self._direction in ("DL", "down"): self._iperf_direction = "down" else: self._iperf_direction = "both" self._iperf_settings = { "server_ip_address": self._server_ip_address, "port_number": self._port, "duration": self._duration, "protocol": self._iperf_protocol, "computer": self._computer } # Update the failure targets self._throughput_targets.set_failure_throughput_from_config( self._dut_config, self._failure_targets, self._kpi_test, tc_name._name) # Log Throughput targets for TDSCDMA self._logger.info(throughput_targets_string(self._throughput_targets))
def __init__(self, tc_name, global_config): """ Constructor """ # Call LAB_LTE_BASE Init function LabLteBase.__init__(self, tc_name, global_config) # Read the the direction file name from UseCase xml Parameter self._direction = self._tc_parameters.get_param_value("DIRECTION") # Read the ftp file name from UseCase xml Parameter if self._direction == "DL": self._ftp_filename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("DL_FILENAME", "")) self._ftp_filename = self._ftp_filename.replace('\\', '/') self._dl_ftp_filename = None elif self._direction == "UL": # Read the UL_FILE value from UseCase xml Parameter self._ftp_filename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("UL_FILENAME", "")) self._ftp_filename = self._ftp_filename.replace('\\', '/') self._dl_ftp_filename = None elif self._direction == "BOTH": self._dl_ftp_filename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("DL_FILENAME", "")) self._dl_ftp_filename = self._dl_ftp_filename.replace('\\', '/') # Read the UL_FILE value from UseCase xml Parameter self._ftp_filename = os.path.join( self._ftp_path, self._tc_parameters.get_param_value("UL_FILENAME", "")) self._ftp_filename = self._ftp_filename.replace('\\', '/') # Read the XFER_TIMEOUT from UseCase xml Parameter self._xfer_timeout = self._tc_parameters.get_param_value( "XFER_TIMEOUT") if self._xfer_timeout is not None and str( self._xfer_timeout).isdigit(): self._xfer_timeout = int(self._xfer_timeout) else: self._xfer_timeout = None self._rrc_state = self._tc_parameters.get_param_value( "RRC_STATE", "RRC_CONNECTED") # Initializing the variable which will contain the IP address to use. self._ip_address = None self._phone_system = self._device.get_uecmd("PhoneSystem") ###################################################### # LTE THROUGHPUT SETTINGS # ###################################################### self._set_lte_throughput_settings() # LTE FTP Test are FUTE by default if self._failure_targets == "": self._failure_targets = "FUTE" # Update the failure targets self._throughput_targets.set_failure_throughput_from_config( self._dut_config, self._failure_targets) # Log Throughput targets for LTE category self._logger.info(throughput_targets_string(self._throughput_targets)) self._ftp_api = self._device.get_uecmd("Ftp")
def __init__(self, tc_name, global_config): """ Constructor """ # Call LAB_LTE_BASE Init function LabLteBase.__init__(self, tc_name, global_config) # Get the IP of the Iperf LTE server self._server = \ global_config.benchConfig.get_parameters("LAB_LTE_SERVER") self._server_ip_address = self._server.get_param_value("IP") # Read Iperf PORT self._port = int(self._tc_parameters.get_param_value("PORT")) # Read Iperf measurement duration self._duration = \ int(self._tc_parameters.get_param_value("DURATION", "120")) # Read direction (Upload/Download/BOTH) self._direction = self._tc_parameters.get_param_value( "DIRECTION", "UL") self._rrc_state = self._tc_parameters.get_param_value( "RRC_STATE", "RRC_CONNECTED") ###################################################### # IPERF SETTINGS # ###################################################### # Read Iperf protocol self._iperf_protocol = \ str(self._tc_parameters.get_param_value("IPERF_PROTOCOL", "UDP")) self._iperf_bandwidth = \ str(self._tc_parameters.get_param_value("IPERF_BANDWIDTH", None)).upper() self._computer = None if self._ns_model == "AGILENT_E6621A": # Get computer type self._computer = \ self._tc_parameters.get_param_value("COMPUTER", "IPERF_SERVER") self._computer_type = \ global_config.benchConfig.get_parameters("IPERF_SERVER") # Get TCP window size and number of iperf client threads to run concurrently # TCP Window size shall be greater than: # - Expected throughput * LTE_RTT (round trip time) # Max LTE throughput is 150Mbps and LTE_RTT < 20ms # Iperf compute automatically the windows size. # It is better to not set a window size as result with iperf default size are pretty good self._iperf_uldl_parameters = retrieve_parameters_from_tc_params( self._tc_parameters) self._buffer_length = \ int(self._tc_parameters.get_param_value("BUFFER_LENGTH", 0)) self._dut_ip_address = None # Detect if it is a KPI test or not self._kpi_test = self._tc_parameters.get_param_value( "KPI_TEST", False, "str_to_bool") if self._kpi_test: self._logger.info("It is a KPI test") self._kpi_data = None self._current_iteration = 0 # Set Iperf direction if self._direction in ("UL", "up", None): self._iperf_direction = "up" elif self._direction in ("DL", "down"): self._iperf_direction = "down" else: self._iperf_direction = "both" # Detect if a BLER measurement is needed. It performs BLER measurement the following way: # Wait a quarter of IPERF duration then perform BLER measurement during half of IPERF duration self._perform_bler = self._tc_parameters.get_param_value( "BLER", False, "str_to_bool") self._iperf_settings = {} ###################################################### # LTE THROUGHPUT SETTINGS # ###################################################### self._set_lte_throughput_settings() # Update the failure targets self._throughput_targets.set_failure_throughput_from_config( self._dut_config, self._failure_targets, self._kpi_test, tc_name._name) # Log Throughput targets for LTE category self._logger.info(throughput_targets_string(self._throughput_targets))