Exemplo n.º 1
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()
Exemplo n.º 2
0
    def test_Ftp_Download_Server(self):
        os.system("adb shell am force-stop com.ftpcafe")
        android = Android()
        adbClient = AdbClient()
        run_times = config.get("setting", "run_times")
        times = config.get("ftp_setting", "times")
        filename = config.get("ftp_setting", "filename_download")
        filestart = config.get("ftp_setting", "filename_download")
        fileend = config.get("ftp_setting", "filename_download_size")
        print "NB Server & android Client (ftp loop download)"
        self.Swiandroidh_FtpClient()

        for i in range(1, int(run_times) + 1):
            android.Mobile_Device_Connect()
            # self.Download_Over()
            # self.Ftp_Creat_Account()

            for j in range(1, int(times) + 1):
                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)
                print "The filename is " + filename
                self.Del_File("..\..\\Result\\log\\vsftpd.log")
                self.Transfer_Status(filestart, fileend)
                self.Getfile_Command()
                self.Check_File_Status()
                self.ADB_Event("4")
                self.Screen_Shot_Save("FTP_Download")
                self.FTP_Drate()
                self.ADB_Event("66")
                self.ADB_Event("66")
                self.ADB_Event("111")
                self.ADB_Event("111")
                self.ADB_Event("111")

        self.Mobile_Device_Disconnect()
        print "mobile_device_disconnect"
Exemplo n.º 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_")