Exemplo n.º 1
0
    def set_up(self):
        """
        Validating the test parameters.
        """
        # Calling Base Class SetUp method
        LiveDualPhoneVcBase.set_up(self)

        # If Flight Mode was set
        if self._networking_api.get_flight_mode():
            # Disable flight mode and wait
            # for the phone to settle down
            self._logger.info("Disabling Flight Mode for secondary DUT.")
            self._networking_api.set_flight_mode("off")

        if self._networking_api2.get_flight_mode():
            # Disable flight mode and wait
            # for the phone to settle down
            self._logger.info("Disabling Flight Mode for main DUT.")
            self._networking_api2.set_flight_mode("off")
            time.sleep(30)
        # Other wise we may have some pending calls
        else:
            # Release any previous call (Robustness)
            self._logger.info("Releasing any previous active Voice Call.")
            self._voice_call_api.release()
            self._voice_call_api2.release()

        return Global.SUCCESS, "No errors"
    def set_up(self):
        """
        Validating the test parameters.
        """
        # Calling Base Class SetUp method
        LiveDualPhoneVcBase.set_up(self)

        # Checking phone Idle State parameter
        if not self._screen_state:
            message = "%s '%s' %s '%s'" % (
                "Invalid parameter value (or missing parameter)",
                str(self._screen_state), "for parameter", "STATE")
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                     message)

        # Check the MT call Test Scenario parameter
        '''
        Possible values for scenario defined:
        CALL_IDLE_SCREEN,
        DL_AFT_ANS,
        DL_BEF_ANS,
        DR_AFT_ANS,
        DR_BEF_ANS
        '''
        if not self._action:
            message = "%s '%s' %s '%s'" % (
                "Invalid parameter value (or missing parameter)",
                str(self._action), "for parameter", "ACTION")
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                     message)

        return Global.SUCCESS, "No errors"
Exemplo n.º 3
0
    def set_up(self):
        """
        Validating the test parameters.
        """
        # Check the parameter with the Supplementary Services feature
        if self._ss_feature is None or \
            self._ss_feature not in LiveDualPhoneVcSs.SS_FEATURES:
            message = "%s '%s' %s '%s'" % (
                "Invalid parameter value (or missing parameter)",
                str(self._ss_feature),
                "for parameter",
                "SS_FEATURE")
            raise AcsConfigException(
                AcsConfigException.INVALID_PARAMETER,
                message)

        # Check the SS_MODE parameter
        if not self._ss_mode:
            message = "%s '%s' %s '%s'" % (
                "Invalid parameter value (or missing parameter)",
                str(self._ss_mode),
                "for parameter",
                "SS_MODE")
            raise AcsConfigException(
                AcsConfigException.INVALID_PARAMETER,
                message)

        # Calling Base Class SetUp method
        LiveDualPhoneVcBase.set_up(self)

        # Check the SS_PHONE_NUMBER parameter
        if not self._ss_phone_number:
            message = "%s '%s' %s '%s'" % (
                "Invalid parameter value (or missing parameter)",
                str(self._ss_phone_number),
                "for parameter",
                "SS_PHONE_NUMBER")
            raise AcsConfigException(
                AcsConfigException.INVALID_PARAMETER,
                message)

        # Check the Call Duration parameter
        if not self._callduration:
            message = "%s '%s' %s '%s'" % (
                "Invalid parameter value (or missing parameter)",
                str(self._callduration),
                "for parameter",
                "CALL_DURATION")
            raise AcsConfigException(
                AcsConfigException.INVALID_PARAMETER,
                message)

        return Global.SUCCESS, "No errors"
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        LiveDualPhoneVcBase.__init__(self, tc_name, global_config)

        # Get phone number of the DUT
        self._phone_number = str(self._device.get_phone_number())

        # Instantiate the instances for phone caller, receiver and releaser
        self._caller_phone = self._voice_call_api2
        self._receiver_phone = self._voice_call_api
        self._releaser_phone = self._voice_call_api2
Exemplo n.º 5
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        LiveDualPhoneVcBase.__init__(self, tc_name, global_config)

        # Get phone number of the reference phone
        if self._phone2 is not None:
            # Add #31# to phone number to have a private number as caller
            self._phone_number = "%23" + "31" + "%23" + str(self._phone2.get_phone_number())

        # Instantiate the instances for phone caller, receiver and releaser
        self._caller_phone = self._voice_call_api
        self._receiver_phone = self._voice_call_api2
        self._releaser_phone = self._voice_call_api
Exemplo n.º 6
0
    def run_test(self):
        """
        Execute the test
        """
        verdict = Global.SUCCESS
        msg = "No errors"
        LiveDualPhoneVcBase.run_test(self)

        # Get last call details
        dialed_number, call_type, used_sim = self._voice_call_api2.get_last_call_details()
        time.sleep(self._wait_btwn_cmd)

        # Check if last call number is a private number
        if int(dialed_number) != -2:
            verdict = Global.FAILURE
            msg = "Line identification result is not as expected: %s" % dialed_number

        return verdict, msg
Exemplo n.º 7
0
    def __init__(self, tc_name, global_config):

        """
        Constructor
        """
        LiveDualPhoneVcBase.__init__(self, tc_name, global_config)

        # Get phone number of the DUT
        self._phone_number1 = str(self._device.get_phone_number())

        # Get phone number of the reference phone
        if self._phone2 is not None:
            self._phone_number2 = str(self._phone2.get_phone_number())

        # Read SMS_TRANSFER_TIMEOUT from xml UseCase parameter file
        self._sms_transfer_timeout = \
            int(self._tc_parameters.get_param_value("SMS_TRANSFER_TIMEOUT"))

        # The SMS message content
        self._message = \
            str(self._tc_parameters.get_param_value("MESSAGE_CONTENT"))

        self._callduration = \
            int(self._tc_parameters.get_param_value("CALL_DURATION"))

        # Retrieve phone system APIs
        self._phonesystem_api = self._device.get_uecmd("PhoneSystem")

        # Get UECmdLayer
        self._voice_call_api = self._device.get_uecmd("VoiceCall")
        self._messaging_api = self._device.get_uecmd("SmsMessaging")
        self._networking_api = self._device.get_uecmd("Networking")
        self._phone_system_api = self._device.get_uecmd("PhoneSystem")

        # Load instance of the PHONE2
        self._phone2 = DeviceManager().get_device("PHONE2")

        if self._phone2 is not None:
            self._messaging_api2 = self._phone2.get_uecmd("SmsMessaging")
            #self._networking_api2 = self._phone2.get_uecmd("Networking")

        else:
            self._voice_call_api2 = None
            self._networking_api2 = None
Exemplo n.º 8
0
    def __init__(self, tc_name, global_config):

        """
        Constructor
        """
        LiveDualPhoneVcBase.__init__(self, tc_name, global_config)

        # Get phone number of the DUT
        self._phone_number = str(self._device.get_phone_number())

        self._phone_serial = DeviceManager().get_device("PHONE1")
        self._phone_serial_number = str(self._phone_serial.get_serial_number())
        self.d = Device(self._phone_serial_number)
        self._phone2_serial = DeviceManager().get_device("PHONE2")
        self._phone2_serial_number = str(self._phone2_serial.get_serial_number())
        self.d2 = Device(self._phone2_serial_number)

        # Get phone number of the reference phone
        if self._phone2 is not None:
            self._phone_number2 = str(self._phone2.get_phone_number())
        # Read the Supplementary Service parameter
        self._ss_feature = self._tc_parameters.get_param_value("SS_FEATURE")
        # Read the Supplementary Service Mode parameter
        self._ss_mode = self._tc_parameters.get_param_value("SS_MODE")

        # Read the Phone Number for Supplementary Service
        self._ss_phone_number = self._tc_parameters.get_param_value("SS_PHONE_NUMBER")

        # Delay introduced for the Supplementary Service activation or de-activation
        self._wait_ss_response = 30
        # Modify the call setup time in case the Supplementary Service is active
        self._call_setup_time = 15

        self._test_timeout=10

        # Retrieve phone system APIs
        self._phone_system_api = self._device.get_uecmd("PhoneSystem")
        self._phone_system_api2 = self._phone2.get_uecmd("PhoneSystem")
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        LiveDualPhoneVcBase.__init__(self, tc_name, global_config)

        # Get phone number of the DUT
        self._phone_number1 = str(self._device.get_phone_number())

        # Get phone number of the reference phone
        if self._phone2 is not None:
            self._phone_number2 = str(self._phone2.get_phone_number())

        # Get Test Cases Parameters
        self._screen_state = \
            (self._tc_parameters.get_param_value("STATE"))

        # Get Test Cases Parameters
        self._action = \
            (self._tc_parameters.get_param_value("ACTION"))

        # Retrieve phone system APIs
        self._phonesystem_api = self._device.get_uecmd("PhoneSystem")