Ejemplo n.º 1
0
    def tear_down(self):
        """
        End and dispose the test
        """

        # Call use case base tear_down function
        LabLteBase.tear_down(self)

        # Clear old SMS
        self._messaging_api.delete_all_sms()

        return Global.SUCCESS, "No errors"
Ejemplo n.º 2
0
    def tear_down(self):
        """
        End and dispose the test
        """

        # Call LabLteBase Tear down
        LabLteBase.tear_down(self)

        # Disconnect audio analyzer
        self._audio_analyzer.release()

        return Global.SUCCESS, "No errors"
Ejemplo n.º 3
0
    def run_test(self):
        """

        Execute the test
        """

        # Call the LabLteBase run_test function
        LabLteBase.run_test(self)
        self._messaging_api.delete_all_sms()

        if self._sms_direction == "MT":
            sms_sent = SmsMessage(self._sms_text, self._incoming_number, "PSD")

            # register on intent to receive incoming sms
            self._messaging_api.register_for_sms_reception()

            # set custom sms text to equipment
            time.sleep(self._wait_btwn_cmd)
            self._messaging_4g.set_custom_sms_text(self._sms_text)

            # Send sms over sgs
            self._messaging_4g.send_sms_over_sgs()

            # get sms received
            sms_received = self._messaging_api.wait_for_incoming_sms(
                self._sms_transfer_timeout)
        elif self._sms_direction == "MO":
            # TODO: SMS MO PS is not yet supported by the platform
            # BZ:112539
            raise DeviceException(
                DeviceException.FEATURE_NOT_AVAILABLE,
                "SMS MO PS is not yet supported by the platform")

        else:
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                     "SMS_DIRECTION should be Only MO or MT")

        # Compare sent and received SMS (Text, Destination number)
        (result_verdict, result_message) = \
            compute_sms_equals(sms_sent, sms_received)

        self._logger.info(result_message)

        return result_verdict, result_message
Ejemplo n.º 4
0
    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")
Ejemplo n.º 5
0
    def set_up(self):
        """
        Set up the test configuration
        """

        # Call the LabLteBase Setup function
        LabLteBase.set_up(self)

        # Set Cell on
        self._ns_cell_4g.set_cell_on(self._mimo)

        # Flight mode deactivation
        self._networking_api.set_flight_mode("off")

        # Set APN for LTE and/or IMS depending on protocol IPv4 or IPv6
        self._set_apn_for_lte_and_ims()

        # Activate PDP context
        time.sleep(self._wait_btwn_cmd)
        self._logger.info("Active PDP Context...")
        self._networking_api.activate_pdp_context(self._ssid)

        # Check data connection state is "CON"
        self._check_data_connection_state("CON")

        # Check registration state is connected using
        # registrationTimeout from Device_Catalog.xml
        self._modem_api.check_cdk_registration_bfor_timeout(
            self._registration_timeout)

        # Get RAT from Equipment
        network_type = self._ns_data_4g.get_network_type()

        # Check that DUT is registered on the good RAT
        self._modem_api.check_network_type_before_timeout(
            network_type, self._registration_timeout)

        return Global.SUCCESS, "No errors"
Ejemplo n.º 6
0
    def set_up(self):
        """
        Initialize the test
        """

        LabLteBase.set_up(self)

        # Connect to audio analyzer
        self._audio_analyzer.init()

        # Perform audio configuration
        self._ns_voice_call_4g.set_audio_codec(self._codec)
        self._ns_voice_call_4g.set_speech_configuration("AUDioboard")

        self._ns_voice_call_4g.calibrate_analog_audio_level(self._analog_input_peak_level,
                                                            self._analog_output_peak_level)

        if self._aa_ref_file_path:
            # Copy audio test file to UPV
            self._audio_analyzer.copy_to_upv(self._host_ref_file_path,
                                             self._aa_ref_file_path)

        return Global.SUCCESS, "No errors"
Ejemplo n.º 7
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LAB_LTE_BASE Init function
        LabLteBase.__init__(self, tc_name, global_config)

        self._sms_text = self._tc_parameters.get_param_value("SMS_TEXT")

        self._sms_transfer_timeout = \
            int(self._tc_parameters.get_param_value("SMS_TRANSFER_TIMEOUT"))

        # the incoming number
        # The  default number is for CMW500, we can't change it for the moment
        self._incoming_number = \
            self._tc_parameters.get_param_value("INCOMING_NUMBER")
        if self._incoming_number is None or self._incoming_number == "":
            self._incoming_number = "+498941290"

        self._sms_direction = self._tc_parameters.get_param_value(
            "SMS_DIRECTION")

        self._messaging_4g = self._ns.get_cell_4g().get_messaging()
        self._messaging_api = self._device.get_uecmd("SmsMessaging")
Ejemplo n.º 8
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        LabLteBase.__init__(self, tc_name, global_config)

        # Read AUDIO_ANALYZER parameters from BenchConfig.xml
        self._audio_analyzer_node = \
            global_config.benchConfig.get_parameters("AUDIO_ANALYZER")

        self._ims = "on"

        self._call_stream_volume_dut = self._tc_parameters .get_param_value("CALL_VOLUME_DUT")

        # Read CODEC from test case xml file
        self._codec = str(self._tc_parameters.get_param_value("CODEC"))
        if 'WB' in self._codec:
            self._codec_type = "WB"
        elif 'NB' in self._codec:
            self._codec_type = "NB"

        # Read Keep Record value from test case xml file (string)
        self._keep_record = str_to_bool(self._tc_parameters.get_param_value("KEEP_RECORD"))

        # Read AUDIO_FILE from test case xml file
        self._ref_file = str(self._tc_parameters.get_param_value("AUDIO_FILE"))

        # Read time between 2 successive measurement
        self._wait_between_measure = int(self._tc_parameters.get_param_value("WAIT_BETWEEN_MEASURE"))

        # Read ConfPath from AUDIO_ANALYZER BenchConfig.xml
        self._aa_conf_path = os.path.join(
            str(self._audio_analyzer_node.get_param_value("ConfPath")))

        # Read DestPath from AUDIO_ANALYZER BenchConfig.xml
        self._aa_dest_path = os.path.join(
            str(self._audio_analyzer_node.get_param_value("DestPath")))

        # Construct reference audio file path on bench computer
        self._host_ref_file_path = os.path.join(self._aa_conf_path,
                                                self._ref_file)

        self._host_deg_file_path = os.path.join(self._aa_conf_path,
                                                self._name.split('\\')[-1].split('-')[0] + "-" +
                                                str(self._tc_parameters.get_ucase_name()) + "_")

        # Construct reference audio file path on UPV
        self._aa_ref_file_path = os.path.join(self._aa_dest_path,
                                              self._ref_file)

        # Construct degraded audio file path on UPV
        self._aa_deg_file_path = os.path.join(self._aa_dest_path,
                                              "voice_degraded_upv.wav")

        # Read callSetupTimeout from Device_Catalog.xml
        self._call_setup_time = \
            int(self._dut_config.get("callSetupTimeout"))

        self._phone_number = \
            str(self._tc_parameters.get_param_value("PHONE_NUMBER"))
        if self._phone_number.upper() == "[PHONE_NUMBER]":
            self._phone_number = str(self._device.get_phone_number())

        # Read CALL_DURATION from test case xml file
        self._call_duration = \
            int(self._tc_parameters.get_param_value("CALL_DURATION"))

        # Read VC_TYPE from testcase xml file
        self._vc_type = str(self._tc_parameters.get_param_value("VC_TYPE"))

        # Read RELEASE_VC_SIDE from testcase xml file
        self._release_vc_type = str(self._tc_parameters.get_param_value("RELEASE_VC_TYPE"))

        self._analog_input_peak_level = self._ns_node.get_param_value("AnalogInputPeakLevel")
        self._analog_output_peak_level = self._ns_node.get_param_value("AnalogOutputPeakLevel")

        self._elapsed_time = 0

        # Instantiate generic UECmd for all use cases
        self._voice_call_api = self._device.get_uecmd("VoiceCall")
        self._networking_api = self._device.get_uecmd("Networking")
        self._modem_api = self._device.get_uecmd("Modem")
        self._phonesystem_api = self._device.get_uecmd("PhoneSystem")
        self._system_api = self._device.get_uecmd("System")
        self._audioalgocontroller_api = self._device.get_uecmd("AudioAlgoController")

        # Create voice call 4G API
        self._ns_voice_call_4g = self._ns.get_cell_4g().get_voice_call()

        # Create audio analyzer
        self._audio_analyzer = self._em.get_audio_analyzer("AUDIO_ANALYZER")

        # Number of retry permitted for a single measurement on the audio analyzer
        self._audio_analyzer_meas_retry = 5
Ejemplo n.º 9
0
 def tear_down(self):
     AnyUsbTether.tear_down(self)
     # Stopping the FTP service before releasing the equipment.
     self._ns_data_4g.stop_ftp_service()
     return LabLteBase.tear_down(self)
Ejemplo n.º 10
0
 def run_test(self):
     (code, message) = LabLteBase.run_test(self)
     if code == Global.SUCCESS:
         (code, message) = AnyUsbTether.run_test(self)
     return code, message