Forum Discussion

dhoeke's avatar
dhoeke
New Contributor
7 years ago

Unable to connect to the Android Device (when run from Jenkins, works perfeclty from within TC)

Hi there,

 

I'm trying to set up TestComplete with Jenkins, but when I run my tests via Jenkins, then TestComplete is unable to connect to the mobile device (emulator and phys. device) while the same test works perfectly when I launch TC manually and start the test.

 

Jenkins is installed locally (master) on a Windows 10 machine and is running as a service.

 

Why is TestComplete not recognizing the emulators or physical device when I launch the test via Jenkins, but it does when I launch the test from within TC?

 

I tried to work with a delay (to give TC more time to find the device), but it did not work since it's not a timeout problem, but the test immediately stops with the error that the device is disconnected.

 

Any help on this issue is highly appreciated!

 

Thank you so much,

have a good day!

 

- dhoeke

 

TC Version: 12.42.3048.7 x64

Microsoft Windows 10 Standard, 64-bit (10.0 Build 14393)

 

Device

LG-H420

Android 5.0.1

TC Android Agent installed and running

10 Replies

  • Johnisher's avatar
    Johnisher
    New Contributor

    Hi,

     

    I founded some kind of solution.

    Jenkins run TestComplete as 64 bit from source:

     

    C:\Program Files (x86)\SmartBear\TestComplete 12\x64\bin\TestComplete.exe

     

    You need to change source in Jenkins to run TestComplete.exe on: 

     

    C:\Program Files (x86)\SmartBear\TestComplete 12\bin\TestComplete.exe

     

    or simpler solution:


    You can cheat and create shortcut "TestComplete.exe" in source C:\Program Files (x86)\SmartBear\TestComplete 12\x64\bin\ from source C:\Program Files (x86)\SmartBear\TestComplete 12\bin\ and then Jenkins will be running TestComplete as 32 bit.
    It's work for me

    • NLI's avatar
      NLI
      New Contributor

      I had the same problem. The 32 bit version of TestExecute was used and it worked without problems, but then something (electricity went down and I suspect this is the cause, but I don't understand why and how) caused a change in Jenkins and the 64 bit version was used by Jenkins. Change it to 32 bit using a shortcut, then it worked again like before.

    • NLI's avatar
      NLI
      New Contributor

      How can I change the source in Jenkins to run TestComplete.exe on "C:\Program Files (x86)\SmartBear\TestComplete 12\bin\TestComplete.exe" and not on "C:\Program Files (x86)\SmartBear\TestComplete 12\x64\bin\TestComplete.exe" ?

       

      I don't want to do it with a shortcut. Where in Jenkins, or how can I change the version used in Jenkins, to the 32 bit TestComplete/TestExecute ?

       

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    > Jenkins is installed locally (master) on a Windows 10 machine and is running as a service.

    My guess is that the reason is because of Jenkins running as a service.

    Service applications do not have their user desktop where applications can display their UI.

    Try to run Jenkins and its agents as regular applications but not a service and check if this help.

  • NLI's avatar
    NLI
    New Contributor

    https://community.smartbear.com/t5/TestComplete-General-Discussions/How-to-set-Test-Complete-12-32-bit-as-default-exe-instead-of-64/m-p/154264#M28438

     

    solution in that post:

    "The Jenkins plugin will always run the 64-bit version of TestComplete if it exists. To use the 32-bit version, rename the <TestComplete>\x64\Bin\TestComplete.exe file on your Jenkins node to a different name, e.g. TestComplete64.exe. Also, feel free to create an enhancement request for the Jenkins plugin."

  • dhoeke's avatar
    dhoeke
    New Contributor

    Hi AlexKaras,

     

    thank you so much for your help!

     

    Unfortunetaly, although I installed Jenkins via the .war file and run it as an application from the Windows cmd and not as a service any longer, the problem is not solved and I keep getting the exact same issue.

     

    Best,

    Dominik