示例#1
0
	def test_Iperf_TCP_Na(self):
		rs232_putty = RS232_Putty()
		rs232_putty.RS232_Connect_Putty()
		os.system("adb shell am force-stop com.magicandroidapps.iperf")
		android = Android()
		adbClient = AdbClient()

		for i in range(1,int(config.get("setting","run_times"))+1):
			
			for j in range(1,int(config.get("iperf_setting", "times"))+1):
				self.Del_File("result.txt")
				iperf_command = "-s -i 5"
				# adbClient.Swiandroidh_Iperf()
				self.Mobile_Device_Connect()
				self.Killall_Iperf()
				adbClient.Service_Iperf_Start_N('iperf '+iperf_command)
				self.Iperf_Log_Clean()
				adbClient.Iperf_Client()
				adbClient.Getfile_Command_Iperf()
				os.system("adb shell input keyevent 4")
				android.Screen_Shot_Save("iperf_tcp_na")
				android.Mobile_Device_Disconnect()
				adbClient.Strip_Split_Iperf()
				adbClient.Move_File("Down_")
				adbClient.Split_Move_File("Down_split_")
示例#2
0
    def test_Ftp_Download_With_Handy(self):
        os.system("adb shell am force-stop com.ftpcafe")
        os.system("adb shell am force-stop com.anite.handy")
        android = Android()
        adbClient = AdbClient()
        run_times = config.get("setting", "run_times")
        times = config.get("ftp_setting", "times")
        filename = config.get("ftp_setting", "filename_handy")
        filestart = config.get("ftp_setting", "filename_handy")
        fileend = config.get("ftp_setting", "filename_handy_size")
        print "NB Server & android Client (ftp loop download)"

        for i in range(1, int(run_times) + 1):

            for j in range(1, int(times) + 1):
                self.Swiandroidh_FtpClient()
                self.Mobile_Device_Connect()
                # adbClient.Download_Over()
                # android.Ftp_Creat_Account()
                #*******************Download from 10.1.107.213*****************
                # print 'Donwload Times: ' + str(j)
                # self.Ftplog_Renew()
                # self.Ftp_Autoselect_Server('server')
                # self.Ftp_Connect()
                # self.Verify_Ftp_Connect()
                # self.Folder_Select("Downloads")
                # self.Ftp_Download(filename)

                #****************** Download from speed.hine.net***************
                self.Ftp_Autoselect_Server('hinet')
                self.Ftp_Connect()
                self.Verify_Ftp_Connect()
                print 'Donwload Times: ' + str(j)
                time.sleep(10)
                self.Ftp_Download(filename)

                #*******************Handy function ****************************
                self.Swiandroidh_Handy()
                self.Mobile_Device_Connect()
                time.sleep(28)
                print "mobile_device_connect is success."
                time.sleep(1)
                self.Switch_Voice_Quality(j)
                self.Handy_Start_Script()
                time.sleep(1)
                self.Handy_Run_Script()
                print "Run script."
                time.sleep(112)
                self.Screen_Shot_Save("Volte")
                time.sleep(25)
                self.Handy_Keep_Log()
                time.sleep(5)
                self.Get_Handy_Folder()

        android.Mobile_Device_Disconnect()
        print "mobile_device_disconnect"
示例#3
0
 def Speed_Test(self, filename):
     android = Android()
     adbClient = AdbClient()
     print "Speed_Test"
     # adbClient.Swiandroidh_Speedtest()
     android.Mobile_Device_Connect()
     time.sleep(2)
     android.Verify_Speed()
     time.sleep(40)
     android.Speed_Download()
     android.Speed_Upload()
     android.Screen_Shot_Save(filename)
     android.Mobile_Device_Disconnect()
示例#4
0
    def test_Iperf_TCP_An(self):
        rs232_putty = RS232_Putty()
        rs232_putty.RS232_Connect_Putty()
        os.system("adb shell am force-stop com.magicandroidapps.iperf")
        android = Android()
        adbClient = AdbClient()

        for i in range(1, int(config.get("setting", "run_times")) + 1):

            for j in range(1, int(config.get("iperf_setting", "times")) + 1):
                adbClient.Del_File("result.txt")
                iperf_command = "-s -i 5"
                time.sleep(2)
                # adbClient.Swiandroidh_Iperf()
                android.Mobile_Device_Connect()
                android.Service_Iperf_Start(iperf_command)
                android.Iperf_Log_Clean()
                adbClient.Get_Android_IP()
                adbClient.Client_Iperf_Start()
                android.Screen_Shot_Save("iperf_tcp_an")
                android.Mobile_Device_Disconnect()
                adbClient.Strip_Split_Iperf()
                adbClient.Move_File("Up_")
                adbClient.Split_Move_File("Up_split_")