示例#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 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()
示例#3
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_")