Search code examples
androidlinuxeclipsetestingmonkeytalk

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


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.

Solution

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