Tuesday, December 07, 2010

MonkeyRunner Testing on Android - Kapil Sharma


The android monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. 

With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation. 

The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.

The monkeyrunner tool is not related to the UI/Application Exerciser Monkey, also known as the monkey tool. The monkey tool runs in an adb shell directly on the device or emulator and generates pseudo-random streams of user and system events. 

In comparison, the monkeyrunner tool controls devices and emulators from a workstation by sending specific commands and events from an API.
The monkeyrunner tool provides these unique features for Android testing:
  • Multiple device control: The monkeyrunner API can apply one or more test suites across multiple devices or emulators. You can physically attach all the devices or start up all the emulators (or both) at once, connect to each one in turn programmatically, and then run one or more tests. You can also start up an emulator configuration programmatically, run one or more tests, and then shut down the emulator.
  • Functional testing: monkeyrunner can run an automated start-to-finish test of an Android application. You provide input values with keystrokes or touch events, and view the results as screenshots.
  • Regression testing - monkeyrunner can test application stability by running an application and comparing its output screenshots to a set of screenshots that are known to be correct.
  • Extensible automation - Since monkeyrunner is an API toolkit, you can develop an entire system of Python-based modules and programs for controlling Android devices. Besides using the monkeyrunner API itself, you can use the standard Python os and subprocess modules to call Android tools such as Android Debug Bridge.
    You can also add your own classes to the monkeyrunner API. This is described in more detail in the section Extending monkeyrunner with plugins.

    The monkeyrunner tool uses Jython, a implementation of Python that uses the Java programming language. Jython allows the monkeyrunner API to interact easily with the Android framework. With Jython you can use Python syntax to access the constants, classes, and methods of the API.

Android 2.3 Official Video

Android 2.3 SDK :

http://developer.android.com/sdk/android-2.3.html

New User Features:
1.) UI refinements for simplicity and speed
2.) Faster, more intuitive text input
3.) One-touch word selection and copy/paste
4.) Improved power management
5.) Control over applications
6.) New ways of communicating, organizing

New Developer Features
1.) Enhancements for gaming
2.) New forms of communication
3.) Rich multimedia

New Platform Technologies
1.) Media Framework
2.) New Linux Kernel
3.) New Dalvik runtime

Tuesday, June 08, 2010


Apps on sdcard -- can't install apps anymore: Tips for installation.

Try this trick:

kash@ubuntu:- /xyz$ adb shell

# cd system/app

# chmod 771 app

# exit

kash@ubuntu:- /xyz$ adb install kash.apk

And the the .apk installed on Android device.


Monday, May 24, 2010

Android Froyo 2.2 SDK release.


Froyo >> 2.2 New SDK

1.) Dalvik JIT, improve CPU performance 2-5 times
2.) V8 JavaScript engine, improve browser JavaScript performance by 2-3 times
3.) 3G tethering via USB and Wifi
4.) New camera UI for controlling zoom, flash, white balance, geo-tagging, focus and exposure.
5.) Microsoft exchange support, incl remote wipe
6.) Bluetooth: share contacts, voice dialing
7.) Android market: app crash/freeze report, auto app update
8.) App2SD
9.) Option for automatic app data backup
10.) Android Cloud to Device Messaging
11.) Supports Macromedia Flash 10.1
12.) Enable/disable data access over Mobile network
13.) Multiple keyboard languages
14.) Voice recognition for 7 dialects of English, Mandarin Chinese, and Japanese
15.) PIN screen lock

Saturday, January 30, 2010


Reading Data from the Database:

There are many ways to read data from an SQL database, but they all come down to a basic sequence of operations:

  1. Create an SQL statement that describes the data that you need to retrieve.

  2. Execute that statement against the database.

  3. Map the resulting SQL data into data structures that the language you're working in can understand.