Script to test Android performance pressure based on Python adb command
Source: Internet
Author: User
<span id="Label3"></p><p><p>Today there is nothing to do, write a python-based script, the main implementation of the script to run the ADB shell command, later if the need for additional functionality, can still be extended on this basis. Needless to say, on the script, the source code is BELOW.<br></p></p><pre style="font-family:‘宋体‘;font-size:12pt;background-color:rgb(255,255,255);"><pre style="font-family:‘宋体‘;font-size:12pt;background-color:rgb(255,255,255);">Ostest_adb_port (): os.system () i = (). readline () j = i.split () [-] c = j.replace (,) = Os.system (%c) os.s Ystem () os.system () test_testmsg (b): a = Os.system (%b[][]) a = =: c = Test_adb_port ()% (b[],c): %b[]zhushi = [,,]command = [,,]l = (, (ZHUSHI,COMMAND)) b l:test_testmsg (b)</pre></pre><p><p>Some of the Monkey's commands can also be added. If you need to use the command of the Android Phone's underlying Linux system, you can separate the "number" in the case of Linux with this command function library.<br></p></p><p><p>example: adb shell Dumpsys cpuinfo | GERP Package Name<br></p></p><p><p>Need to quote in cmd: adb shell ' Dumpsys cpuinfo | GERP Package Name '</p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p><br></p></p><p><p>This article is from the "test technical questions summary" blog, Please be sure to keep this source http://xiaowangu.blog.51cto.com/5707515/1944787</p></p><p><p>Script to test Android performance pressure based on Python adb command</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service