Hata mesajı

Deprecated function: book_prev() (/var/www/vhosts/utafs.com/httpdocs/modules/book/book.module dosyasının 775 satırı) içinde The each() function is deprecated. This message will be suppressed on further calls.

Monkey Test

    Monkey Test, tests the stability of the application and the system interface by sending a serial of events to the device. The system has to run a maximum number of events in minimum time. Please note that, creating loops in the scenario and sending Monkey Test scenarios repeadetly, will overload the device and cause failures.

    Even the same test scenario is sent to multiple devices, different operations will be realized in different applications at each device. This will allow observing many different cases in order to find out possible errors and fix them immediately. For that reason, we recommend running Monkey Test scenarios on multiple devices all the time.

    The main actions for Monkey Test scenarios are:

  1. Add Application to Monkey Test (com.x.y): This action, which is not a must for Monkey Test, is recommended for testing one or more specific applications and can be used several times. During the test, it runs the specified application in Parameter (1). The added applications interact with each other, and the events will only be sent to these applications. When no applications are added, any action from any package will be used without any restrictions.  Do not use this command when running  tests like System User Interface tests or Launcher tests. For detailed information: Select Application Page
  2. Set Duration Between Events (ms): This action defines the waiting time between events. The recommended value is 10 milliseconds. In order to force the device, values 3 to 5 milliseconds can be entered. Values less than 5 milliseconds have an important task of finding out the critical bugs which can not be caught in manual tests. Values defined less than 5 milliseconds can cause overheating and failures. The expectation is to run the system without any failures, even when the duration between the events is set as 5 milliseconds. Therefore, this action is highly critical.
  3. Inject ... Events: Defines the number of events that will be used in Monkey Test and injects these events to the test. Desired number of events must entered in Parameter (1). If event percentages (for any number of actions 31 to 41) will be set manually, then they should be entered before this command. Otherwise the command will use default percentage values for the injected events. For default Percentage values please check the table at Monkey Test
  4. (*)Set TOUCH Event Percentage: Sets the percentage of the number of Touch Events to the whole number of events. This action triggers the reaction of device by touching any point on its screen. Thus, it is possible to test touch based applications on the device. Percentage value must be entered in Parameter (1).
  5. (*)Set MOTION Event Percentage:  Sets the percentage of the number of Motion Events to the whole number of events. This action triggers the moves on the display screen horizontally and vertically. Percentage value must be entered in Parameter (1).
  6. (*)Set TRACKBALL Event Percentage:  This action can only be performed if the device has Trackball specificity. Sets the percentage of the number of Trackball Events to the whole number of events. Percentage value must be entered in Parameter (1).
  7. (*)Set FLIP Event Percentage: Sets the percentage of the number of Flip Events to the whole number of events. Percentage value must be entered in Parameter (1).
  8. (*)Set PINCHZOOM Event Percentage: Sets the percentage of the number of Pinchzoom Events to the whole number of events. Percentage value must be entered in Parameter (1). Pinchzoom describes the actions taken on the screen by using two fingers. For example, in Maps Application zooming in and out and rotating the map can be done using two fingers. Therefore, this action should be tested with available applications such as Maps or Gallery Applications.
  9. (*)Set SYSTEM KEYS Event Percentage: Sets the percentage of the number of System Keys Events to the whole number of events. System Keys are used for actions such as adjusting volume level or taking screenshots. Percentage value must be entered in Parameter (1).
  10. (*)Set MAJOR NAVIGATION Event Percentage: Sets the percentage of the number of Major Navigation Events to the whole number of events. This action first opens a random application and then starts to test the buttons in the application. For example during a video player application, it starts, stops, pauses, rewinds, forwards etc.. Percentage value must be entered in Parameter (1).
  11. (*)Set MINOR NAVIGATION Event Percentage: Sets the percentage of the number of Minor Navigation Events to the whole number of events. This action checks the running application's menu by crossing from one button to another without clicking. Percentage value must be entered in Parameter (1).
  12. (*)Set OTHER simple events' percentage: Sets the percentage of the number of Different Events (out of the ones marked with (*) above)  to the whole number of events. Percentage value must be entered in Parameter (1).
  13. (*)Set application SWITCH events' percentage: Sets the percentage of the number of Switch Events to the whole number of events.
  14. Show All Actions: This button stands at the bottom of the Action List. It opens a new window where all test actions can be seen together. This option allows us to use all actions in any scenario.

(*)  Caution: The actions marked with (*) may be used together or alone. The important point is, in one scnerio, the sum of the percentage values for these actions must be 100. If the first action's value is entered as 100, the following ones will be invalid. The default percentages and order of mentioned actions are listed on the table below at the Monkey Log.

No: Name: Standart (%):
0 Touch Events 15.0
1 Motion Events 10.0
2 Pinchzoom Events 2.0
3 Trackball Events 15.0
4 -- --
5 Minor Navigation 25.0
6 Major Navigation 15.0
7 System Keys Events 2.0
8 Switch Events 2.0
9 Flip Events 1.0
10 Other Events: 13.0
  Total: 100.0

    If Monkey Test is not finished in set Max Duration time, test fails due to Time Out period. For that reason, the value entered as Max Duration Time is critical. Before setting the time out period, duration between events and the number of events must be carefully calculated. For example:

  • Duration Between Events: 10 ms
  • Number of injected events: 2000

2000 x 10= 20.000 ms (20 seconds) is the ideal duration for the test. Behold, diferent problems which will affect total running time may occur while the system is performing the commands. Therefore, the Time Out period, should be 3 or 4 times the ideal test duration time (60 to 80 seconds in this case).

Also, setting an overvalued Time Out period will cause waiting extra time in such situations like android crashes. System interface will not respond to the test and waits needlessly till the time out period ends. Test must end in a reasonable time. Anyway, the failure is recorded and can be observed in log files.

 

uTAFS Monkey Test1 - Screen Shot

 At the example test above, there is no restrictions for any action. The system interface will be tested totally. Crossing randomly between all aplications are allowed.

In this test; 

  • Duration between events will be set to 10 ms,
  • 2000 events will be injected,
  • Test will be ended in maximum 80 seconds; if not, the failure will be recorded and test will be ended.

 

uTAFS Monkey Test2 - Screen Shot

    In the other example above, there are 2 applications entered to the parameters:

  • com.google.android.youtube (Android Youtube Application)
  • com.android.chrome (Android Google Chrome Application)

    Monkey Test will be sending events only these two applications. The applications are allowed to interact each other. Test will be starting randomly fromone of these applications and will be testing these applications interface.

In this test:

  • Duration between events will be set to 10 ms,
  • Youtube will be added to applications that will be tested,
  • Google Chrome will be added to applications that will be tested,
  • 2000 events will be injected,
  • Test will be ended in maximum 80 seconds; if not, the failure will be recorded and test will be ended.