How about start monkey via Uiautomator ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How about start monkey via Uiautomator ?

Judy
Hi,

Recently our test team reported a issue about start monkey via uiautomator.

In uiautomator, start monkey by executeShellCommand(cmd), cmd is "monkey -s ..." same as start from adb shell dircetly.
we find, there are two problems:
1. monkey is running as system, not root, and its parent is 'app_process'
2. after one night test, monkey will stuck at System.err.println.
3. sometimes, in Uiautomator, kill monkey by  executeShellCommand("kill -9 <pid>") will fail, monkey cannot be killed

If start by adb root shell, then no issue happen, monkey is running as root, parent is 'sh'.

My question is:
1. what is the difference between uiautomator and monkey? can then coexist?
2. why monkey's parent is app_process if start by uiautomator executeShellCommand?
3. why monkey's System.err.println hang? seems buffer overflow happen for stderror


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How about start monkey via Uiautomator ?

yinglanwa
Hi, regarding "1. monkey is running as system, not root..."
  We meet same issue.Test team has a system app for aging test. MonkeyStress is a piece of test case, using Uiautomator to run monkey commands. The workflow is, system app -> uiautomator -> Monkey.

# ps -AZ|grep monkey

u:r:system_app:s0              system        8260  6303 4099036  29704 pipe_wait           0 S com.android.commands.monkey

# ps -e|grep 6303

system        6303  6301 4075704  19716 binder_thread_read  0 S app_process

system        8260  6303 4099036  29824 pipe_wait           0 S com.android.commands.monkey

 

   If start Monkey directly via Uiautomator, Monkey is running as root.


# ps -AZ|grep monkey
u:r:su:s0                      root          7072  7039 3312096  49380 futex_wait_queue_me 0 S com.android.commands.monkey
# ps -e|grep 7039
root          7039  7037 3291296  44052 futex_wait_queue_me 0 S app_process
root          7072  7039 3312096  49380 futex_wait_queue_me 0 S com.android.commands.monkey


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How about start monkey via Uiautomator ?

Vitaliy Freidovich
In reply to this post by Judy
Hi,

UiAutomator & monkey serve completely different things:
1. UIAutomator is intended for recording and executing specific UI test scenarios - like start app A, click on button X, input text into Edit Text Y, verify notification is displayed, second app is srtarted etc..
2. Monkey is intended for stress testing an app - it generates many random clicks, to make sure that the app does not crush after such 'crazy' usage.

You don't need UIAutomator to start Monkey, just run it directly as root.


On Tuesday, June 26, 2018 at 5:14:09 PM UTC+3, Judy wrote:
Hi,

Recently our test team reported a issue about start monkey via uiautomator.

In uiautomator, start monkey by executeShellCommand(cmd), cmd is "monkey -s ..." same as start from adb shell dircetly.
we find, there are two problems:
1. monkey is running as system, not root, and its parent is 'app_process'
2. after one night test, monkey will stuck at System.err.println.
3. sometimes, in Uiautomator, kill monkey by  executeShellCommand("kill -9 <pid>") will fail, monkey cannot be killed

If start by adb root shell, then no issue happen, monkey is running as root, parent is 'sh'.

My question is:
1. what is the difference between uiautomator and monkey? can then coexist?
2. why monkey's parent is app_process if start by uiautomator executeShellCommand?
3. why monkey's System.err.println hang? seems buffer overflow happen for stderror


--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.