MonkeyTalk is the world's great mobile app testing tool.
This is very straight forward tool for android and IOS Testing.MonkeyTalk uses true object-based recording. Image-based tools try to identify things like buttons, tables, and text by looking at the pixels on the screen. MonkeyTalk looks "inside" your app to understand exactly what user interactions are being performed.
2. Table of Contents:
1. Introduction (Monkey Talk)
1.1 Features
2. Set up process for eclipse and monkeytalk
2.1
Pre-requisites:
2.2
Downloaded URL
3. Android SDK setup
3.1
Download URL
3.2
SDK Manager
3.3 AVD Manager
3.4 ADT Plugin for eclipse and its URL
4. Monkey Talk setup
4.1 Download URL
4.2 Conversion to AspectJ
4.3 Configration of AJDT
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
3. 1 ) Introduction :
MonkeyTalk is a free, open source, simple-to-use tool with incredible power, MonkeyTalk
automates real, functional interactive tests for native, mobile, and hybrid iOS and Android apps .
It makes the proven benefits of automated functional testing easily available for every project.
Feautures :
•
•
•
•
•
•
Native, Mobile Web, and Hybrid iOS and Android Apps
Simulators or Real Devices - no Jailbreaking required
Robust cross-platform Recording/Playback that actually works!
Use the simple MonkeyTalk command language or powerful JavaScript API
Run your tests interactively or from continuous integration environments
Free and Open Source!
2) Setup Process for Eclipse and Monkey Talk :
Pre-requisites:
•
•
•
•
•
Eclipse sdk
Android SDK setup
ADT Plug-in for Eclipse
Monkey Talk Tool (Testing tool for Mobile Apps Testing)
AJDT (for AspectJ conversion)
Download URL:
Eclipse sdk from URL: http://archive.eclipse.org/eclipse/downloads/drops/R-3.7.2201202080800/winPlatform.php#EclipseSDK
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.
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
4. 3) 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 URL :
Android sdk from the following URL :
http://dl.google.com/android/android-sdk_r22.2.1-windows.zip
No need to install the Android, just unzip the downloaded folder (android-sdk_r18windows) 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 you want to install by checking corresponding checkbox:
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
5. Connect Android SDK with Eclipse IDE:
1. Click on the “Eclipse” menu (next to the apple logo for OSX) and choose “Preferences”
2. Click on “Android” heading in the menu-tree to open our Android Eclipse preferences
3. Click the “Browse…” button to the right of the ”SDK Location” box
4. Enter the location of your Android SDK (the $ANDROID path from Step #1)
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:
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
6. 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 1024 MB
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.
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
7. 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.
If you are getting failed to launch the emulator or getting the error:
Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information
Then try to reduce the ram size and can use resolution of:
1) Resolution 1280x800,Ram-1024mb and Heap size-48
2) Ram-512mb and Heap size-32
3) Resolution 720 X 1280 ,Ram-128mb and Heap size-16
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: https://dl-ssl.google.com/android/eclipse/
• Click Ok
Restart the Eclipse , it will ask for the Android SDK which we have already installed on our pc
So just give the location of the Android SDK path
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
8. 4) Monkey Talk :
Download Url:
Monkey Talk can be downloading from the below address:
http://www.gorillalogic.com/testing-tools/monkeytalk/download
Pre-requisit : AJDT Plugin
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
Location : http://download.eclipse.org/tools/ajdt/37/update
Click Ok. ( It will configure the AJDT with Eclipse. )
Adding the MonkeyTalk Android Agent
Open your Android project in Eclipse : (Convert your Android project to AspectJ)
1. Right click on your project
2. Click on Configure and select convert to AspectJ Project
Add the monkeytalk-agent.jar to your Android project.
The agent can be found in the agents/android/ folder in the main MonkeyTalk.zip
package you downloaded earlier .The exact name of the android agent jar will include the
version number (for example, monkeytalk-agent-1.0.30.jar).
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
•
http://precisetestingsolution.com/
9. •
Create a libs/ folder in your Android project (if you don't already have one), and copy the
agent jar into it.
Include the monkeytalk-agent.jar in the AspectJ build path (right-click on monkeyTalkagent.jar > AspectJ Tools > Add to Aspectpath).
Update your AndroidManifest.xml to include the following two permissions:
•
•
android.permission.INTERNET
android.permission.GET_TASKS
Select your AndroidManifest.xml file, copy these two permissions from any of the existing
android app’s manifest.xml and paste it in your AndroidManifest.xml as shown below:
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
10. Update the project properties
(right-click on the project > Properties > Java Build Path),
select the Order and Export tab, and check the checkbox next to the AspectJ Runtime
Library to export it:
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/
11. You should also export the monkeytalk-agent.jar file you added to the project. (Note: in some
older versions of the Android Development Tools, this export may create a "Dexification
Error" - if you get this problem just uncheck this).
Deploy your application to an Android device or emulator.sss
Precise Testing Solution Private Limited
P.N. India +91-9555814488 USA +1 7183128801
http://precisetestingsolution.com/