def setup_class(self):
        super().setup_class()
        self.ad = self.android_devices[0]
        self.ip_server = self.iperf_servers[0]
        self.port_num = self.ip_server.port
        self.log.info("Iperf Port is %s", self.port_num)
        self.ad.sim_card = getattr(self.ad, "sim_card", None)
        self.log.info("SIM Card is %s", self.ad.sim_card)
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.wlan_option = self.user_params.get("anritsu_wlan_option", False)
        self.md8475_version = self.user_params.get("md8475", "A")
        self.step_size = self.user_params.get("power_step_size", 5)
        self.start_power_level = self.user_params.get("start_power_level", -40)
        self.stop_power_level = self.user_params.get("stop_power_level", -100)
        self.lte_bandwidth = self.user_params.get("lte_bandwidth", 20)
        self.MAX_ITERATIONS = abs(int((self.stop_power_level - \
                                 self.start_power_level) / self.step_size))
        self.log.info("Max iterations is %d", self.MAX_ITERATIONS)

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address, self.wlan_option,
                                   self.md8475_version)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        return True
Exemplo n.º 2
0
 def setup_class(self):
     try:
         self.anritsu = MD8475A(self.md8475a_ip_address, self.log)
     except AnritsuError:
         self.log.error("Error in connecting to Anritsu Simulator")
         return False
     return True
    def setup_class(self):
        super().setup_class()
        try:
            self.stress_test_number = int(
                self.user_params["stress_test_number"])
            self.log.info(
                "Executing {} calls per test in stress test mode".format(
                    self.stress_test_number))
        except KeyError:
            self.stress_test_number = 0
            self.log.info(
                "No 'stress_test_number' defined: running single iteration tests"
            )

        self.ad = self.android_devices[0]
        self.ad.sim_card = getattr(self.ad, "sim_card", None)
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.wlan_option = self.user_params.get("anritsu_wlan_option", False)
        self.md8475_version = self.user_params.get("md8475", "A")

        setattr(self, 'emergency_call_number', DEFAULT_EMERGENCY_CALL_NUMBER)
        if 'emergency_call_number' in self.user_params:
            self.emergency_call_number = self.user_params[
                'emergency_call_number']
            self.log.info("Using provided emergency call number: {}".format(
                self.emergency_call_number))
        if not self.emergency_call_number in EMERGENCY_CALL_NUMBERS:
            self.log.warning("Unknown Emergency Number {}".format(
                self.emergency_call_number))

        # Check for all adb devices on the linux machine, and set APM ON
        cmd = "|".join(("adb devices", "grep -i device$", "cut -f1"))
        output = exe_cmd(cmd)
        list_of_devices = output.decode("utf-8").split("\n")
        if len(list_of_devices) > 1:
            for i in range(len(list_of_devices) - 1):
                self.log.info("Serial %s", list_of_devices[i])
                if check_apm_mode_on_by_serial(self.ad, list_of_devices[i]):
                    self.log.info("Device is already in APM ON")
                else:
                    self.log.info("Device is not in APM, turning it ON")
                    set_apm_mode_on_by_serial(self.ad, list_of_devices[i])
                    if check_apm_mode_on_by_serial(self.ad,
                                                   list_of_devices[i]):
                        self.log.info("Device is now in APM ON")

        if self.ad.sim_card == "VzW12349":
            set_preferred_apn_by_adb(self.ad, "VZWINTERNET")

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address, self.wlan_option,
                                   self.md8475_version)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        return True
    def setup_class(self):
        super().setup_class()
        self.ad = self.android_devices[0]
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.ad.sim_card = getattr(self.ad, "sim_card", None)

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        return True
Exemplo n.º 5
0
 def _configure_simulation(self):
     try:
         self.anritsu = MD8475A(self.md8475a_ip_address, self.log,
                                self.wlan_option)
         [lte_bts] = set_system_model_lte(self.anritsu, self.user_params,
                                          self.ad.sim_card)
         self.bts = lte_bts
         lte_bts.bandwidth = BtsBandwidth.LTE_BANDWIDTH_10MHz
         set_usim_parameters(self.anritsu, self.ad.sim_card)
         self.anritsu.start_simulation()
         self.anritsu.send_command("IMSSTARTVN 1")
     except AnritsuError:
         self.log.error("Error in connecting to Anritsu Simulator")
         return False
     return True
    def setup_class(self):
        super().setup_class()
        self.ad = self.android_devices[0]
        self.ad.sim_card = getattr(self.ad, "sim_card", None)
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.wlan_option = self.user_params.get("anritsu_wlan_option", False)
        self.md8475_version = self.user_params.get("md8475", "A")
        self.wait_time_between_reg_and_msg = self.user_params.get(
            "wait_time_between_reg_and_msg", WAIT_TIME_BETWEEN_REG_AND_MSG)

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address, self.wlan_option,
                                   self.md8475_version)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        return True
    def setup_class(self):
        super().setup_class()
        self.ad = self.android_devices[0]
        self.ad.sim_card = getattr(self.ad, "sim_card", None)
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.wlan_option = self.user_params.get("anritsu_wlan_option", False)
        self.md8475_version = self.user_params.get("md8475", "A")
        if self.ad.sim_card == "VzW12349":
            set_preferred_apn_by_adb(self.ad, "VZWINTERNET")

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address, self.wlan_option,
                                   self.md8475_version)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        return True
    def setup_class(self):
        super().setup_class()
        self.ad = self.android_devices[0]
        self.ad.sim_card = getattr(self.ad, "sim_card", None)
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.wlan_option = self.user_params.get("anritsu_wlan_option", False)
        self.md8475_version = self.user_params.get("md8475", "A")
        self.ad.adb.shell("settings put secure cmas_additional_broadcast_pkg "
                          "com.googlecode.android_scripting")
        self.wait_time_between_reg_and_msg = self.user_params.get(
            "wait_time_between_reg_and_msg", WAIT_TIME_BETWEEN_REG_AND_MSG)

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address, self.wlan_option,
                                   self.md8475_version)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        self.activation_attemps = self.user_params.get("activation_attemps", 3)
        return True
Exemplo n.º 9
0
    def setup_class(self):
        super().setup_class()
        self.ad = self.android_devices[0]
        self.ad.sim_card = getattr(self.ad, "sim_card", None)
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.wlan_option = self.user_params.get("anritsu_wlan_option", False)
        self.md8475_version = self.user_params.get("md8475", "A")
        self.voice_call_number = self.user_params.get('voice_call_number',
                                                      DEFAULT_CALL_NUMBER)
        self.ip_server = self.iperf_servers[0]
        self.port_num = self.ip_server.port
        self.log.info("Iperf Port is %s", self.port_num)
        if self.ad.sim_card == "VzW12349":
            set_preferred_apn_by_adb(self.ad, "VZWINTERNET")

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address, self.wlan_option,
                                   self.md8475_version)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        return True
    def setup_class(self):
        super().setup_class()
        try:
            self.stress_test_number = int(
                self.user_params["stress_test_number"])
            self.log.info(
                "Executing {} calls per test in stress test mode".format(
                    self.stress_test_number))
        except KeyError:
            self.stress_test_number = 0
            self.log.info(
                "No 'stress_test_number' defined: running single iteration tests"
            )

        self.ad = self.android_devices[0]
        self.ad.sim_card = getattr(self.ad, "sim_card", None)
        self.md8475a_ip_address = self.user_params[
            "anritsu_md8475a_ip_address"]
        self.wlan_option = self.user_params.get("anritsu_wlan_option", False)
        self.md8475_version = self.user_params.get("md8475", "A")

        setattr(self, 'voice_call_number', DEFAULT_CALL_NUMBER)
        if 'voice_call_number' in self.user_params:
            self.voice_call_number = self.user_params['voice_call_number']
            self.log.info("Using provided voice call number: {}".format(
                self.voice_call_number))

        if self.ad.sim_card == "VzW12349":
            set_preferred_apn_by_adb(self.ad, "VZWINTERNET")

        try:
            self.anritsu = MD8475A(self.md8475a_ip_address, self.wlan_option,
                                   self.md8475_version)
        except AnritsuError:
            self.log.error("Error in connecting to Anritsu Simulator")
            return False
        return True
Exemplo n.º 11
0
 def __init__(self, controllers):
     TelephonyBaseTest.__init__(self, controllers)
     self.anritsu = MD8475A(tel_test_utils.MD8475A_IP_ADDRESS)