Archive for September, 2012

PPTs for Cookie Testing:

For  download ppts for cookie testing  Click Here


Data Driven Script:

In MonkeyTalk you can use/create the Data Driven Script by using RunWith action and three files are required for Data Driven Script.

1. Main file– Its extension is .mt.In this main script is written.

Vars * Define user pass
Input username tap
Input username EnterText ${user}
Input password EnterText ${pass}
Button LOGIN Verify LOGIN %thinktime=1000
Button LOGIN tap
Label * Verify “Welcome, ${user}!” %thinktime=3000
Button LOGOUT VerifyNot LOGIN
Button LOGOUT tap %thinktime=5000

you can view tabular form of Tabular form script:


2. Driver script: Its extension is .mt. This script is use to run the main file.

Script RunWith credentials.csv

you can view tabular form of Tabular form Driver script:

3. CSV File:Its extension is .csv.

You can create csv file in your MonkeyTalk project by following below mentioned steps :

Right click on project folder

new >>other >>Click on General >>choose file >> give a name with extension .csv

Now  in this file give values for variables which you are defined in main file/script. In first row of this file mention variables name separated by space which you have define in main file.

user pass

you can view tabular form of Tabular form csv file:

MonkeyTalk Parameterized script:

Passing variable values through driver script. Value for variables can be passed as arguments in a driver script. The only requirement is that they should be provided in the same order as they are declared. We have two scripts here one is the main code (driven) script and the driver script.

In MonkeyTalk form:

# Driven script (

Vars * Define paswords user

Input username EnterText ${user}

Input password EnterText ${pass}

Button LOGIN Tap %thinktime=500

Button LOGOUT Tap %thinktime=3000

You can view the tabular form of driven ( script which i have created:

# Driver Script

Script Run john “mypassword”

Script Run john1 “mypassword1” %thinktime=3000

Driver script in tabular form:

Parametrized script by using default  values:


Vars * Define username=Jyoti  password=test

Input username EnterText ${username}

Input password EnterText ${password}

Button LOGIN Tap %thinktime=3000

Label * Verify “Welcome, ${username}!” %thinktime=3000


17:03:44.664: Started Script Playback

17:03:44.673: Vars * Define username=Jyoti pw=test

17:03:44.681: Input username EnterText jyoti

17:03:45.340: Input password EnterText test

17:03:46.004: Button LOGIN Tap %thinktime=3000

17:03:49.180: Label * Verify “Welcome, fred!” %thinktime=3000

17:03:53.327: Completed Script Playback – OK

when we send the parameters through driver script

Script Run pooja

In this case username argument will take pooja and password argument takes default value i.e. test


17:09:05.839: Started Script Playback

17:09:05.843: Script Run pooja

17:09:05.848: Started Script Playback

17:09:05.851: Vars * Define usr=jyoti pw=test

17:09:05.855: Input username EnterText pooja

17:09:06.614: Input password EnterText test

17:09:07.088: Button LOGOUT tap %thinktime=3000

17:09:07.297: Button LOGIN Tap %thinktime=3000

17:09:10.543: Label * Verify “Welcome, pooja!” %thinktime=3000

17:09:11.158: Completed Script Playback – OK

Steps to record actions from emulator to MonkeyTalk IDE:

1. Open Eclipse.

2. Import project in eclipse and convert it to AspectJ by following steps mentioned on “ “link.

3. Open Emulator.

4. Deploy your application to an Android device or emulator.

     Right click on Android project

     Choose “Run as” option and then “Android Application”

5. Open app in emulator for which you want to record script.

6. Open MonkeyTalk IDE and Click on the connection dropdown button on the tool bar (on initial start up it will be the green android icon).

7. Choose “Android Emulator” or “iOS Simulator”.

8. If connection was successful, a message to that effect should appear in the console.

9. In case record button is not visible to you can try

     Create a new AVD (emulator)

     Install a fresh app in emulator

     Stop and restart the server by:

     adb kill-server

     adb start-server

10. Create a MonkeyTalk project in MonkeyTalk IDE.

11. Then Create script under this MonkeyTalk project and Click on record button.

Installation of any App in Emulator:

Installing App in Emulators need the .apk file which we can find in the sameproject folder.

Path of the .apk file: workspace> project> bin\

There are different ways of installing Android App (.apk file) in emulators as mentioned below:

Way 1: If we are using Eclipse version 3.7.2, then on executing the Android project in Eclipse (without throwing any error) will automatically install the App (.apk file) in emulator (make sure the Emulator is open while executing the Eclipse Android project).

Way 2: We can also install the Android App (.apk file) through ‘adb’ (Android Debug Bridge).

adb is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.

Path of adb: Drive\android-sdk-windows\platform-tools

‘adb’ used for installing any App in Android. As per mentioned command in screenshot is used for installing any app.

Installation Command is:

adb install demo.apk

[adb( command) install (command) demo.apk (path of.apk file of  demo android project)]

have a look on sceenshot for reference:

Note: Emulator should be already opened while installing any App into Emulator

Setup Process for Eclipse and Monkey Talk:

In order to start with Mobile App testing, there are some pre-requisites software/packages which we need to install/unzip on machine.


•   Eclipse setup

•   Android SDK setup

•   ADT Plug-in for Eclipse

•   Monkey Talk Tool (Testing tool for Mobile Apps Testing)

•   AJDT (for AspectJ conversion)


Download Eclipse from URL:

Version: Eclipse Classic 3.7.2 (Windows 32 Bit)

No need to install the Eclipse, just unzip the downloaded folder anywhere in local drive. That will provide the ‘eclipse.exe’ which will open the Eclipse framework.

On opening the Eclipse framework, it will ask for the location of ‘workspace’ folder (‘Workspace’ is the location where the entire Eclipse project will be saved). Make any workspace folder anywhere in your machine and give the location.

Now Eclipse has successfully configured. Now we can open Eclipse, write any program and can save program to workspace folder.

Android SDK setup:

We need to setup and configure Android with Eclipse. Basically it is for development process but in case if we need to check how’s the application behave we can have a look on such the application in eclipse.

Download Android-sdk-windows (android-sdk_r18-windows) from the following URL:

No need to install the Android, just unzip the downloaded folder (android-sdk_r18-windows) anywhere in local drive. That will provide the ‘SDK Manager.exe’ (which will open the Android SDK Manager) and ‘AVD Manager.exe’ (which will open the AVD Manager).

a ) SDK Manager: used for installing the Android packages

  • Run the ‘SDK Manager.exe’ (can be found in the ‘android-sdk-windows’ folder)
  • Android SDK manager will provide the list of package to install
  • Install any of the package (like Android 4.0.3 (API 15))

b) AVD Manager: used for creating the Virtual Device (emulator)

•Run the ‘AVD Manager.exe’ (can be found in the ‘android-sdk-windows’ folder)

•‘Android Virtual Device Manager’ window will be open.

•Click on New> and follow the steps as shown in below screenshot:

Name: name of Virtual device (or emulator

Target: version of Android emulator which you are going to use

CPU/ABI: for Android, use ARM

SD Card ‘Size’: it could be 512MB or 1GB

Snapshot: checked (best practice) [It will keep the track if any activity killed or process crashed, if its enabled we can restore the session ]

Skin ‘Built-in’: HVGA (for Android)

Click on ‘CreateAVD’. It will create the AVD which will be seen in ‘Android Virtual Device Manager’ under ‘AVD Name’ section.

Select the AVD name and click on ‘Start’. ‘Launch Option’ pop-up will be open. Then click on ‘Launch’.  It will open the Android emulator.

ADT plug-in for Eclipse:

ADT plug-in extends the capabilities of Eclipse to let you quickly set up new Android projects, build an app UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.

To install ADT plug-in:

• Start Eclipse> Help > Install New Software….

• Click Add, in the top-right corner.

• In the Add Repository dialog that appears, enter “ADT Plug-in” for the Name and the following URL for the Location:


• Click OK

Restart the Eclipse. It will ask for the Android SDK (which is we have already install as above mentioned steps) so Just give the location of Android SDK path.

Now while looking on the Eclipse, TWO newly added icons will be shown.

These TWO icons are for ‘AVD Manager’ and ‘Android SDK Manager’.

Now Eclipse is configured with Android SDK.

Monkey Talk:

Monkey Talk can be downloading from the below address:

Pre-requisit for installing Monkey Talk Agent:

For installing the Monkey Talk Android Agent, first we need to convert Android project into AspectJ.

For doing so, we need to configure AJDT in Eclipse by following steps:

Eclipse> Help> Install New Software > Click on Add…

In ‘Add Repository’ popup:

Name: AJDT


Click Ok. It will configure the AJDT with Eclipse.

Android App Test Cases (UI Related Scenarios):

  • Verified that Alignment should be proper.Expected result: Alignment should be proper.
  • Check each and every buttons, images Pixels as per wire frame/page schematic or screen blueprint.Expected result: Dimensions must be same as defied in wireframe.
  • Verify that Proper images size displayed in well manner with Orientation.
  • Verify that all Spell check are correct on Alert, error popup,Error messages etc.
  • Verified that Spinner (Size, Types) should be suitable as per screen.
  • Verify that application Logo should not be blurred and App title should not be misspelled (Means whole logo text should be displayed))
  • Verify that Font size should be consistent.
  • Verify that any kind of text should not be cutting off.
  • Verify that any kind of graphics should not be blurred, Check with different resolution Devices (Like BB have Different resolution for all devices, iPhone 3Gs or iPhone 4)
  • Verify that application must not perform inappropriate actions while thinking or rendering by making user input while the application or handset is busy processing or rendering.There must be no inappropriate reaction by the Application.
  • Verify that On Taping (Single Tap) Application Logo , Application Splash should display.
  • Verify that Application Splash Should not display More than 4 Second
  • Verify that there is visual feedback when response to any action takes more than 3 seconds.
  • Verify that each screen should be visible for the time necessary to comfortably read all its information by moving between screens of an application. Each screen must be visible for the time necessary to comfortably read all its information.
  • Verify that error messages in the Application must be clearly understandable.
  • Verify that error messages must clearly explain to a user the nature of the problem, and indicate what action needs to be taken (where appropriate).
  • Verify that any function selected in the Application should start within 5 seconds.
  • Verify that there must be some visual indication that the function is being performed like
     – prompting for user input;
    – displaying splash screens or progress bars;
    – displaying text such as “Please wait…”, etc
  • Verify that If the screen requires data entry on a specific field, should identify the required fields with a red asterisk and generate a friendly warning if the data is left blank
  • Verify that If the screen contains dates, numeric, currency or other specific data types, ensure that only valid data can be entered.
  • Verify that If the screen contains text boxes that allow data entry, ensure that the width of data entered does not exceed the width of the table field.
  • If the information in the screen is not self-explanatory to the casual user, should provide onscreen instructions to aid the user.
  • If the screen takes more than 5 seconds to display the results/page, it should contain a progress bar so that the user understands the processing is continuing.
  • The screen look, feel, and design should match the other screens in your application. (Application should match with the Wireframe or design document provided).
  • If the screens contain abbreviations (e.g. Nbr for number, Amt for amount, etc), the abbreviations should be consistent for all screens in the application.
  • If the screen allows changing of data without saving, it should prompt users to save if they move to another record or screen.
  • If a person deletes an item, it is a good idea to confirm the delete. User should be prompted with confirmation alert.
  • If the user interface uses combo boxes (drop down lists), be sure to include type ahead (if there are hundreds of items in a list, users should be able to skip to the first item that begins with that letter when they type in the first letter).
  • Ensure the test cases look for grammar or spelling errors.
  • If the application lists information in table format and the data in the table extend past one page, the scrolling should scroll the data but leave the table headers intact.
  • If fatal errors occur as users use your application, ensure that the application writes those errors to a log file, event viewer, or a database table for later review. Log the routine the error was in, the person logged on, and the date/time of the error.
  • Ensure that error messages are informative, grammatically correct, and not condescending.
  • If the application allows short cut keys for copy/paste etc, should test each and every short cuts
  • Do not show menu items that are not available for the context users are currently in.
  • Use a style guide to document what choices are available for dialog boxes. Application should not have Save/Cancel dialog on one screen and an OK/Cancel on another. This is inconsistent.
  • Ensure that the screen font family matches from screen to screen. Mismatching fonts within the same sentence and overuse of different fonts is not allowed.
  • Ensure that the screen font sizes match from screen to screen. A good user interface will have an accompanying style guide that explicitly defines the font type and size for headers, body text, footers, etc.
  • Ensure that screens do not use different color sets as to cause an guide should define header colors, body background colors,screen background color, footer colors, etc.
  • Ensure that icons are consistent throughout your application by using a common icon set. For example, a BACK link that contains an icon next to it should not have a different icon on one screen versus another. Avoid free clip-art icons.
  • Ensure that narrative text appears at the same location on the screen on all screens.
  • Ensure that narrative text, error messages and other instructions are presented in laymen’s terms but are brief and to-the-point.
  • If your application has links on the screen (e.g. Save as Spreadsheet, Export, Print, Email, etc.), ensure that the links have consistent spacing between them and other links, that the links appear in the same order from screen to screen, and that the color of the links are consistent.
  • If your application has menu items, ensure that menu items that are not applicable for the specific screen are disabled and the order in which each menu item appears is consistent from screen to screen.
  • If your application has buttons (e.g. Submit, OK, Cancel, etc), ensure that the buttons appear in a consistent order from screen to screen (e.g. Submit then Cancel).
  • Tabbing will go onto the next field on the screen