Joke Collection Website - Blessing messages - How to test android automatically with python?
How to test android automatically with python?
Let's talk about the principle of mobile phone automatic test 1. The principle of mobile phone automatic test is that a control terminal (test tool) on PC is connected with an agent terminal on mobile phone through serial port, USB or wireless mode, and then the test tool is applied to send a request or command to the mobile phone. After receiving the command or request, the mobile phone gives it to the agent terminal for analysis, and then the agent sends these analyzed commands to commands that can be recognized by each functional module of the mobile phone to call those functions. After these operations, the mobile phone will return some information, which can be captured by the agent and then sent back to the PC, thus completing a complete mobile phone automation test. 2. The emphasis is on agency. Some companies implant the test program response code into the software function module of their mobile phone terminals, and some companies can control the mobile phone terminals through MMI_Command. The principle is to provide a response interface for mobile phones. 3. As for the PC control terminal, this test script can be written in various programming languages, depending on how to define 4. And automatic testing is designed as a recording mechanism. Generally speaking, it is to record manual keyboard information or LCD operation information (LCD needs intelligent recognition mechanism). 5. The construction method of automated testing framework is universal, and you need to have your own testing framework to ensure the smooth development of automated testing. Second, Android automation testing direction: 1, CTS, CTS testing is based on Android instrumentation test and JUnit test. To put it bluntly, CTS is just a bunch of unit test cases. This is also the advantage of the Java language. 2. Monkey tool. Monkey is a command-line tool in Android, which can be run in the simulator or in the actual device. It sends pseudo-random user event streams (such as key input, touch screen input, gesture input, etc.). ) into the system to realize the stress test of the application under development. Monkey testing is a fast and effective method to test the stability and robustness of software. 3.ASE, ASE means Android scripting environment, that is, we can call Android functions through scripts (such as Python) to customize some tests. For example, make phone calls, send text messages, browse the web, etc. We can extend its API(Java part) and call these APIs with python scripts, thus realizing rich testing functions. The API part can access all APIs of Android, and python can flexibly deploy tests, so ASE is very scalable. 4.Robotium, used for automatic testing of black boxes. You can use the source code or just APK to test the target application. Robotimu provides an API to imitate the user's operation behavior, such as clicking a control, entering text and so on. I suggest you study this tool, it is open source, and I have the information. You can develop an automatic test tool for mobile phones yourself. The principle is the same. If you want any information or want to study together, you can email me :test_sunny@hotmail.com.
- Previous article:Greetings to my lover for Mid-Autumn Festival.
- Next article:How to use Ding?
- Related articles
- Is it true that you have a crush on text messages? Yes, but it's a naked marketing tool.
- Lucky words when going out.
- How to add enterprise wechat
- Marketing incentive information
- How to send web messages for free?
- Scores of higher vocational colleges
- Excuse me, who knows the skills of SMS marketing, and who knows how to teach it?
- Short messages from roommates
- What does SMS banking mean?
- What is the background of oral emotional copy (suitable for oral copy)