Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Tuesday, 24 July 2012

Steps to Install Agent in MonkeyTalk


Monkey Talk:
Monkey Talk can be downloading from the below address:


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

For Eclipse setup and configuration with Android SDK, Cleck here.. 

Steps to configure AJDT in Eclipse:
Eclipse> Help> Install New Software > Click on Add
In ‘Add Repository’ popup:
 Name: AJDT
Click Ok. It will configure the AJDT with Eclipse.

 

 Installing the Monkey Talk Android Agent:

Open your Android Project in Eclipse and follow these instructions.

1. Convert your Android project to AspectJ



       2MonkeyTalk-agent.jar ‘monkeytalk-agent-1.0.8.beta4c’ can be found in the "agents" folder in the Monkey Talk package you downloaded earlier. The exact name of the jar might vary depending on the version, but it should always start with "Monkey Talk-agent".
 3. Create a "libs" folder in your Android project, if you don't already have one.
 4. Copy the .jar file (monkeytalk-agent-1.0.8.beta4c) into the libs folder.
 5. Right click on MonkeyTalk-agent.jar > AspectJ Tools > Add to Aspectpath.
6. Update your AndroidManifest.xml to include the following two permissions:
a)      android.permission.INTERNET
b)      android.permission.GET_TASKS
 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:


 Note: In case if checking only ‘AspectJ Runtime Library’ does not work then check all the uncheck checkboxes.


MonkeyTalk Script Guidelines:
MonkeyTalk works on Record-Play concept, and for automation it requires simple Java Script knowledge. For the guidelines Click here

Script examples:
1. Simple Login script Click here
2. Data driven script Click here
3. Passing variable script Click here
4. Conditional statement script Click here

Eclipse configuration with Android SDK


Pre-requisites:
  1.  Eclipse setup
  2. Android SDK setup
  3. ADT Plug-in for Eclipse
  4. AJDT (for AspectJ conversion)

Eclipse:
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).

     i) 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))


      ii) 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:
      ·         https://dl-ssl.google.com/android/eclipse/
      ·         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.

Thursday, 28 June 2012

Selenium Configuration with Eclipse


1. First we need to install JDK
2. Then we need to install Eclipse (http://www.eclipse.org/downloads/)
(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)
3. Now we need to create a workspace folder –> C\Eclipse-WorkspaceSeleniumTests
(‘Workspace’ is the location where the entire Eclipse project will be saved)
4. Open the Eclipse by ‘eclipse.exe’
5. Close Eclipse welcome screen
6. Click File menu –> Switch Workspace –> other
7. Now Select the C:Eclipse-WorkspaceSeleniumTests folder (refer following screenshot)



8. It has finished setting up the eclipse.  Now, we need to download Selenium RC server / client driver and configure that to Eclipse
9. Download Selenium server:  http://seleniumhq.org/download/
10. Download Selenium Client driver for Java (from Selenium Client Drivers section)
11. Create “Selenium” folder in C: drive and copy the Selenium-server.jar as well as unzip the Selenium Client driver (C:Selenium)
12. Now downloading and unzipping the files into a folder is done.  We need to configure the appropriate Selenium Client driver Jar file to the Eclipse.
a) Go to Eclipse –> Click  File –> New –> Project (from various options need to select just “project”)
b) In Select Wizard –> Click Java –> “Java Project” (refer following screenshot)



c) Give the project name (e.g. FirstProject)
d) Click Finish – Click Yes

13. Now we are done with creation of project and need to configure the Selenium Client driver to this Project
a) Right Click “FirstProject” project



b) Click “Java Build Path”
c) Click Libraries tab
d) Click “Add External JARs” button
e) Select “Selenium Client Drivers” unzipped in C:Selenium folder (Selenium Server JAR file should not be added)
f) Click OK
g) Referenced libraries –> contains both the Selenium Client driver jar files as shown in the below screenshot.


So far, we have done the configuration of Selenium with Eclipse.