Monkey supports custom scripting methods

Getting started with monkey Everyone finds relevant information for self-study, here I mainly introduce how to customize monkey to execute what we want to execute.

Maybe everyone only knows that monkeyrunner can support custom scripting, but monkey also supports it. Monkey and monkeyrunner are not necessarily related.

Everyone knows that monkey clicks randomly, but do we want it not to click randomly? Click according to our wishes.

Two methods:

First: Practical operations based on custom keys, written on the command line, and executed according to the execution conditions.

 

The second way to write scripts to execute monkey

The first method is still not working, how to execute monkey like writing a script, it provides a lot of APIs (by Baidu query)

Script according to API

 

In addition to the above methods, there are other frameworks for mixed use, such as: uiautomator+monkey. This scenario can be used for mixed use. For example, we have special operations during random testing of monkeyu. For example, when we click randomly, we will pull down the status bar at intervals. The operation of pulling down the status bar is a fixed operation, not random.

There are many other uses, don't underestimate the power of monkey.

 

Guess you like

Origin blog.csdn.net/bbs11007/article/details/100213953