Current location - Quotes Website - Collection of slogans - What tools are used for automated testing of Android system?
What tools are used for automated testing of Android system?
Let's talk about the principle of mobile phone automatic test first.

1. The principle of automatic test of mobile phone is that a control terminal (test tool) on PC and an agent terminal on mobile phone connect PC and mobile phone terminal through serial port, USB or wireless, and then use the test tool to send requests or commands to 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 the commands that can be recognized by each functional module of the mobile phone to call those functional modules for simulation operation. 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. For PC control terminal, this test script can use various programming languages, depending on how it is defined.

4. 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. You need to have your own test framework to ensure the smooth development of automated testing.

Second, Android automated testing direction:

1, CTS, CTS test is based on Android instrumentation test, which is based on 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 apply the source code or APK only to the target.

Conduct a test. Robotimu provides an API to imitate the user's operation behavior, such as clicking a control and entering text.

Wait a minute. You can study this tool, it is open source, and I have relevant information.

You can develop an automatic test tool for mobile phone by yourself, and the principle is the same.