Using monkeytalk to test android app, the record button is disabled

164 Views Asked by At

We are using eclipse luna 4.4.1, adb is installed on linux system to test android app. I followed below steps:

  1. Import an android project in eclipse
  2. Created libs folder in the android project and copied monkey talk agent into the libs folder(monkeytalk-agent-2.1.10.jar)
  3. Right click on project and configured to Configur -> Convert to AspectJ Project
  4. Right click on project and select AspectJ Tools -> Add to AspectJpath
  5. Opened the AndroidManifest.xml and copied the below two lines in that xml file to give permission
  6. Right click on the android project and navigated to project properties-> Java Build Path-> Order and Export tab -> checked AspectJ Runtime Library.
  7. Right Click on project ->Run ->Android application.
  8. After that I created a sample project in MonkeyTalkIDEProfessional
  9. And then I created a sample test script in the project(Right click on project and navigated to New -> Script).
  10. Clicked on android connection icon and selected the option(Android Emulator) option. In this case RECORD BUTTON of MonkeyTalkIDEProfessional is DISABLED.
2

There are 2 best solutions below

3
Viktor Malyi On BEST ANSWER

This can be caused by several issues:

  • Port forwarding between your host maschine and emulator is not configured (read more on that). Run following command in order to fix that:

    adb forward tcp:[PORT_NUMBER_IN_USE] tcp:[PORT_NUMBER_IN_USE]

  • The path to Android SDK in MonkeyTalk preferences is not set up correctly. You have to first install Android SDK and then specify path to it in MonkeyTalk. You should probably also check “Include Android Testing?” checkbox.

This tutorial for setting up Android agent in MonkeyTalk can also be useful to you.

0
Sandeep Tengale On

while creating the MonkeyTalk project, it ask you for the instrumented APK. If it is accepting the APK means it is perfectly instrumented. Once it is done, make sure your phone connected to the system, better do

adb devices

If it is perfectly connected, your device should be visible in connect tab of MonekyTalk, select it, then open your Instrumented App on the phone, then the record button automatically appear in the MonkeyTalk. My suggestion is instead of using Emulator better to use Android device.