Forum Discussion

ackmondual's avatar
ackmondual
Contributor
3 years ago

Help with instructions on instrumenting legacy Android app

Windows 10

TestComplete 15.20.341.7 x64

Connected device running Android 7.1.1

Android Studio 3.3.1

 

I'm able to run the app I'd like to develop automated tests for.  SmartBear's pages says that the app should automatically be instrumented when run, but it doesn't look that way due to 2 factors:
1) The Object Browser for the app is empty

2) When I try to use Object Spy while the app is running, it just appears as one, large, singular item.  It can't pick up any individual elements like buttons and boxes of text

 

This version of TC no longer has the Instrument button in the TestedApps tab view, so I'm going with the page below to attempt to instrument the (legacy) Android app...

https://support.smartbear.com/testcomplete/docs/app-testing/mobile/legacy/android/preparing/instrumenting-apps/android-studio.html?sbsearch=Instrument%20Android%20Application

 

... for the Preparation Steps (beginning), step #1-1.. Open your Android project in Android Studio...

I've tried selecting the android app (APK) where it is on my computer, and the directory of the project suite for where TestComplete stores it.  I'm not getting a directory by the name of "app\libs".  Only "libs", and I certainly don't see the PatchServices.jar file there.

  • For "started as Tested Application", does that mean the app needs to be added to the "TestedApps" view?  And then you right click on the app and click on "Run Selected"?

     

    For "manual", :"sources" as in we need the source code?

     

    For the Path to Android SDK and Java Runtime, are there specific files we should be looking for?  For the latter, I guessing "java.exe"?  What about the former?

     

    I currently have them set to...

    C:\Users\[user name]\AppData\Local\Android\Sdk

    and

    C:\Program Files\Android\Android Studio\jre\jre\bin

    Respectively.  Did find "java.exe" in the latter, while the former looks correct from my research.  Assuming those are squared away, I have followed the first few steps concerning setup

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      For "started as Tested Application", does that mean the app needs to be added to the "TestedApps" view?  And then you right click on the app and click on "Run Selected"?

      Yes, correct.

       

       

       

      • ackmondual's avatar
        ackmondual
        Contributor

        Hmm, so if that doesn't work (right clicking on the app and clicking "Run Selected"), can you suggest further troubleshooting steps?  I do believe the link you provided, all steps have been covered.  It's odd that I had no problem getting instrumentation to work on TC14, but not on TC15.

         

        Does SmartBear have a tech support line for such a thing?  I have a customer ID number if they need that since we already purchased a few licenses of TestComplete and TestExecute.