Posts Tagged ‘AspectJ’

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.

Steps to install MonkeyTalk Android Agent:

1. Open your android project in eclipse.

2. Convert your android project in AspectJ .

*For this step you have to configure AJDT in Eclipse by following steps:

Open Eclipse >>Go to help  menu >> Install New Software >> Click on Add

Then fill the fields in ‘Add Repository’ window

Name: AJDT


Click on ok. *

3. Create a folder in your android project named as “libs”,  if you don’t already have one.

4. Copy the MonkeyTalk-agent.jar file in libs folder.

* MonkeyTalk-agent.jar can be found in the “agents” folder in the MonkeyTalk package you downloaded earlier. The exact name of the jar might vary depending on the version, but it should always start with “MonkeyTalk-agent”.

5. Now add this MonkeyTalk jar file to aspect path:

Right click on MonkeyTalk-agent.jar

Go to  AspectJ Tools

Click on  Add to Aspectpath

6. Update your AndroidManifest.xml to include the following two permissions:

  • android.permission.INTERNET
  • android.permission.GET_TASKS

<uses-permission android:name=”android.permission.GET_TASKS” />

<uses-permission android:name=”android.permission.INTERNET” />

*You can find Androidmanifest.xml file under res folder of your android project.*

7. 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.

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

Right click on Android project

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