Ejemplo n.º 1
0
    def run_test(self):
        """
        Execute the test
        """
        # Call LAB_HSPA_BASE Run function
        LabHspaBase.run_test(self)

        # Run FTP transfer using FTP parameters :
        # - LAB_SERVER parameters (ip, username, password)
        # - DIRECTION
        # - DL_FILE or UL_FILE
        # - XFER_TIMEOUT
        time.sleep(self._wait_btwn_cmd)
        return perform_ftp_transfer(self._direction,
                                    self._server_ip_address,
                                    self._username,
                                    self._password,
                                    self._filename,
                                    self._xfer_timeout,
                                    self._device.multimedia_path,
                                    self._ns_DUT_IP_Address,
                                    self._ftp_api,
                                    self._throughput_targets.ul_failure.value,
                                    self._logger,
                                    self._dlfilename,
                                    self._throughput_targets.dl_failure.value,
                                    self._device.binaries_path)
Ejemplo n.º 2
0
    def run_test(self):
        """
        Execute the test
        Test steps:
            Launch FTP.
            Wait for the transfer to finish.
            Measure FTP duration
            Get transferred file size on phone
            Compute throughput
            We are using here ftpput and ftpget methods because it is the only method
            which reach target throughput for LTE category 3&4
            For instance ftp_xfer is about 50% of LTE cat 3 max throughput
        """

        # Call LAB_LTE_BASE run_test function
        LabLteBase.run_test(self)
        # If transfer starts from IDLE, reactivate PDP context for windows platform
        if self._rrc_state == "RRC_IDLE":
            self._networking_api.reactivate_pdp_context(self._apn)

        return perform_ftp_transfer(self._direction, self._ip_address,
                                    self._username, self._password,
                                    self._ftp_filename, self._xfer_timeout,
                                    self._device.multimedia_path,
                                    self._ns_dut_ip_Address, self._ftp_api,
                                    self._throughput_targets.ul_failure.value,
                                    self._logger, self._dl_ftp_filename,
                                    self._throughput_targets.dl_failure.value,
                                    self._device.binaries_path)
Ejemplo n.º 3
0
    def run_test(self):
        """
        Execute the test
        """
        # Initializing local variables.
        iteration = 0
        current_result = (Global.SUCCESS, "")
        message = ""
        # Calling run_test from base class
        LabWcdmaBase.run_test(self)

        # Run FTP transfer using FTP parameters :
        # - LAB_SERVER parameters (ip, username, password)
        # - DIRECTION
        # - DL_FILE or UL_FILE
        # - XFER_TIMEOUT
        while iteration < len(self._ip_address_list) and \
                current_result[0] == Global.SUCCESS:
            # Make as many FTP transfer as there is IP in the IP list.
            time.sleep(self._wait_btwn_cmd)
            current_result = perform_ftp_transfer(self._direction,
                                                  self._ip_address_list[iteration],
                                                  self._username,
                                                  self._password,
                                                  self._ulfilename,
                                                  self._xfer_timeout,
                                                  self._device.multimedia_path,
                                                  self._ns_DUT_IP_Address,
                                                  self._ftp_api,
                                                  self._throughput_targets.ul_failure.value,
                                                  self._logger,
                                                  self._dlfilename,
                                                  self._throughput_targets.dl_failure.value,
                                                  self._device.binaries_path)

            iteration += 1
            # Append messages of the different FTP transfer.
            message = message + current_result[1]
        # Store result.
        result = (current_result[0], message)
        if self._wanted_reg_state == "roaming":
            # Deactivate PDP context
            time.sleep(self._wait_btwn_cmd)
            self._logger.info("Deactivate PDP Context...")
            self._networking_api.deactivate_pdp_context(self._ssid)

            # Check Data Connection State => ATTAched before timeout
            self._ns_data_3g.\
                check_data_connection_state("ATTACHED",
                                            self._registration_timeout,
                                            blocking=False)

            # Check that DUT is registered on the good RAT
            state = self._modem_api.get_network_registration_status()
            self._logger.info("the network registration is in %s state"
                              % state)

        return result
Ejemplo n.º 4
0
    def _perform_ftp_data_transfer(self):
        """
        Performs FTP data transfer
        """
        # Set the throughput targets to 1 kbps - not important
        target_tput = 1
        target_dl_tput = 1

        # Wait 10 seconds
        time.sleep(10)
        # Perform FTP data transfer
        (status, msg) = perform_ftp_transfer(
            self._ftp_direction, self._ip_address, self._username,
            self._password, self._ftp_filename, self._xfer_timeout,
            self._device.multimedia_path, None, self._ftp_api, target_tput,
            self._logger, self._dl_ftp_filename, target_dl_tput,
            self._device.binaries_path)

        return (status, msg)