Easily stop Monkey tests

Today let's see how to stop Monkey testing?

What is Monkey, I will not explain it here, you can understand it as a cute monkey, jumping around to help us stress test programmers. For example, if you click 10,000 times in a row, if you do it manually, it will be a lot of work. Monkey can easily help you do it.

 

When we run the Monkey command:

adb shell monkey -v -p packagename 100000

After the command is issued, the phone starts to execute the monkey automated test.

 

The specific usage of the Monkey command is shown in the following figure:

640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1

 

A tester once said that since the monkey started running, it could not stop at all, unless the execution of the time count was completed, or adb reboot was executed in the cmd window to restart the phone. It's kind of weird to think about.

 

 

So is there an easy way to terminate the monkey test? The answer is yes.

Let's try to end the Monkey test in a stupid way.

 

First, we run adb shell and enter the following command:

ps | grep monkey   

640?wx_fmt=jpeg

 

We can see that there is a monkey process running in the background with an id of 29731, and then we can run the kill command to kill the process. Execute the following command:

 

kill pid 29731

 Just fine.

 

If we execute ps | grep monkey again, we will find that there is no monkey process. It's actually quite simple,

We just use the kill command to kill the monkey process. It's that simple and rude.

 

Let's summarize:

adb shell
ps|grep monkey 
kill id

【END】

Recommended reading:

 

Why do some people still look the same after working for many years?


How to compliment others gracefully? The answer is here


640?wx_fmt=jpeg

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325983322&siteId=291194637