Sunday, May 4, 2014

This place belongs to the pineapple bread, make some and digital home products, touch screen techno


This place belongs to the pineapple bread, make some and digital home products, touch screen technology and other work-related experiences. Topics include embedded linux, digital home, User Interface, multi-touch. I like fantasy, freedom, so sometimes I travel to any ideas, I hope you like it here and enjoy the spirit of freedom together, when a happy elf. Subscribe Wonderfully Abdominous Digital Entertainment - Fantasy Space
Original source article has been lost, it seems a lot of similar situations, so I can not paste the original URL, the author called "JJ", thanking him: Android usage profile in Monkey Monkey is a command line tool that can run on the simulator or an actual device the. It sends a pseudo-random stream of user events to the system being developed to realize the application stress testing. Monkey includes many options, they are broadly divided into four categories: basic configuration options, such as setting the number of events to try. Run constraint options, such as setting a package only for individual tests. Event type and frequency. Debugging options. Monkey running at the time, it generates an event, and put them to the system. Meanwhile, Monkey also to test the system to be monitored, the following three cases for special treatment: If you define a Monkey running on one or a few specific package, then it will attempt to monitor the operation of other packages, and its be blocked. If an application crashes or receives any uncontrolled abnormal, Monkey will stop and error. If the application generates an application is not responding (application not responding) cream tea coffee sugar canisters error, Monkey cream tea coffee sugar canisters will stop and error. Selected according to different levels of feedback, Monkey can also be seen in its implementation and report events generated. Monkey Monkey basic usage can start by developing a command line or a script on the machine. Since Monkey running emulator / device context, it must use its environment to start a shell. Monkey can enter commands cream tea coffee sugar canisters directly after passing in front of each command with adb shell to achieve their goals, you can also enter the Shell. The basic syntax is as follows: $ adb shell monkey [options] If you do not specify options, Monkey will no feedback mode is activated, and the event is sent to any target cream tea coffee sugar canisters environment installed in all packages. Here is an example of a more typical command, it starts the specified application, and send 500 pseudo-random events: $ adb shell monkey-p your.package.name-v 500 command options are listed in the following table All the Monkey command line options available. - Help lists simple usage. -V command line for each-v will increase the level of feedback information. Level 0 (the default value) in addition to the boot prompt, the test is completed and the final results beyond, providing less information. Level 1 provides a more detailed test information, such as sending one by one to the Activity of events. cream tea coffee sugar canisters Level 2 provides a more detailed setting information such as test or not is selected in the selected Activity. Event-s pseudo-random number generator seed value. cream tea coffee sugar canisters If you use the same seed value Monkey run again, it will generate the same sequence of events. cream tea coffee sugar canisters - Throttle insert a fixed delay between cream tea coffee sugar canisters events. Through this option can slow execution speed Monkey's. If this option is not specified, Monkey cream tea coffee sugar canisters will not be delayed, cream tea coffee sugar canisters the event will be produced as soon as possible. - Percentage pct-touch adjustment of the touch event (touch cream tea coffee sugar canisters event is a down-up event, which occurred in a single location on the screen). - Pct-motion action events adjustment percentage (action events generated by a down event somewhere on the screen, a series of pseudo-random events and an up-events). - Pct-trackball to adjust the percentage of track events (track random events generated by the movement of one or more component, sometimes accompanied by a click). - Pct-nav adjust the "basic" navigation events percentage (navigation cream tea coffee sugar canisters events from the direction of the input device up / down / left / right composition). - Pct-majornav adjust the percentage of "major" navigation events (these events cream tea coffee sugar canisters are usually triggered navigate graphical interface actions, such as the middle of the keyboard :5-way button, back button, menu button) - pct-syskeys adjustment "system Percentage "key events (these keys are usually reserved for use by the system, cream tea coffee sugar canisters such as Home, Back, Start Call, End Call and volume cream tea coffee sugar canisters control keys). - Pct-appswitch cream tea coffee sugar canisters adjust the percentage of start Activity. At random intervals, Monkey will perform a startActivity () call, all Activity Pack a way as to maximize coverage. - Pct-anyevent adjust the percentage of other types of events. It include all other types of events, such as: buttons, other equipment not commonly used buttons, and so on. Constraints limit-p If this parameter specifies cream tea coffee sugar canisters one or several packages, Monkey will only allow the system to start these bag Activity. If your application needs to access cream tea coffee sugar canisters other bag Activity (If you choose to take a contact), while those packages cream tea coffee sugar canisters also need to specify this. If you do not specify any package, Monkey will allow the system to start the whole bag of Activity. cream tea coffee sugar canisters To specify cream tea coffee sugar canisters multiple packages, you need to use multiple-p option, each-p option can only be used for one package. -C If you use this parameter to specify one or several categories, Monkey will only allow the system to boot Activity are listed in these categories a category. If you do not specify any category, Monkey Activity category will be selected following listed: Intent.CATEGORY_LAUNCHER or Intent.CATEGORY_MONKEY. To specify more than one category, you need to use multiple-c option, the-c option can only be used for each category. Debugging - dbg-no-events cream tea coffee sugar canisters set this option, Monkey will perform the initial startup into a test Activity, then no further generate events. For best results, put it with the-v, one or several packages constraints, and a Monkey to keep running for 30 seconds or more non-zero values together to provide an environment that can be invoked to monitor the application package between conversions. - Hprof set this option to generate profiling reports and immediately after the sequence of events before the Monkey. This will generate large files (~ 5Mb) in data / misc, so be careful to use it. - Ignore-crashes often, when an application crashes or any uncontrolled abnormal, Monkey will stop running. If you set this option, Monkey will continue to send events to the system cream tea coffee sugar canisters until the count is completed. - Ignore-timeouts Typically, cream tea coffee sugar canisters when an application any timeout errors (such as "Application Not Responding" cream tea coffee sugar canisters dialog) when, Monkey will stop running. If you set this option, Monkey cream tea coffee sugar canisters will continue to send events to the system until the count is completed. cream tea coffee sugar canisters - Ignore-security-exceptions Normally, when an application error occurs license (such as starting a need for some license Activity) when, Monkey will stop running. If this option is set, Monkey will continue to send events to the system until the count is completed. - Kill-process-after-error Normally, when Monkey stopped due to an error, the error in the application will continue running. When this option is set, it will stop the process of notification system error occurred. Note that the normal (successful) conclusion, did not stop the process started, the device only after the end of the event, simply keep in the final state. - Monitor-native-crashes Android system cream tea coffee sugar canisters to monitor and report on the collapse of the local code event. If you set the - kill-process-after-error, the system will stop running. - Wait-dbg stop running Monkey, until a debugger, and it is connected to. Next, look at an example Monkey usage is $ adb shell monkey-p cream tea coffee sugar canisters your.package.name-v 500 First, we need to find an application in Emulator in the corresponding package name, I started looking for a directory, the former 7 steps to complete this work, and ultimately find application package are under data / data, you can cd data / data in the shell, then ls to view the current Emulator all application package. If we want to do in the SDK APIDemos stress tests, a new project in Eclipse, the F: \ android-sdk-windows \ platforms \ android-2.0 \ samples \ ApiDemos added to the project, click run, this time, his APK should be loaded into the Emulator on the command line, type adb shell enter ls to view directory of the current folder, perform the following results C: \ Documents and Settings \ Administrator> adb shell # ls ls sqlite_stmt_journals cream tea coffee sugar canisters config cache sdcard d etc system sys sbin proc init. rc init.goldfish.rc init default.prop data root dev application packages are in data, we enter cd data into the data folder, as follows # cd data cd data input ls View folder, as follows: # ls ls mi

No comments:

Post a Comment