68

I have a strange situation with Jenkins when trying to run the tests.

The configuration of the job clearly specifies to run the tests on this specific avd: "hudson_en-US_160_HVGA_android-18_armeabi-v7a", but for some odd reasons, during the build process, 2 devices are found. One of the devices is the previous one, but the other is called "unknown-sdk".

enter image description here

The tests are successfully executed on the specific avd, and fail on "unknown-sdk":

The relevant portion of the log:

[SR.runTests] Executing instrumentation suite on 2 device(s).
[SR.runTests] [emulator-8215] Starting execution.
[SR.runTests] [localhost:8216] Starting execution.

Running am instrument -w -r -e class com.smoke.tests.LoginTest com.muume.dev.test/android.support.test.runner.AndroidJUnitRunner on unknown-sdk-localhost:8216

2015-06-17 11:54:05 [SDR.printStream] [localhost:8216] STDOUT 11:54:05 I/InstrumentationResultParser: test run failed: 'Unable to find instrumentation info for: ComponentInfo{com.muume.dev.test/android.support.test.runner.AndroidJUnitRunner}

As you can see, it detected 2 devices: emulator-8215 which is the known avd, and localhost-8216 which is the unknown and causes the problems.

My question is how to restrict the tests to run only one single emulator, and from where did the "unknown-sdk-localhost" comes from.

Andy Res
  • 15,963
  • 5
  • 60
  • 96
  • 3
    I guess you are using the Android Emulator plugin for Jenkins. Can you paste (part of) the job configuration? – webo80 Jun 22 '15 at 11:46
  • 3
    Maybe look at the running process list on the host and see if you have a hung emulation? – Cookster Jun 23 '15 at 19:14
  • 2
    are u using gennymotion for the other device ? the second device uses adb over http (localhost) and not adb bridge over USB so different ruels apply and i'm not sure spoon knows how to handle that, even android studio and eclipse needs a plugin for gennymotion to function properly and debug or see logs – codeScriber Jul 21 '15 at 15:35
  • 2
    i now see it was asked a month ago, Did u get it resolved ? – codeScriber Jul 21 '15 at 17:02
  • then do you use gennymotion ? – codeScriber Jul 22 '15 at 16:47
  • Please post the Jenkins configuration (both the one to start the emulator, if any, and the one about running tests). – Sir4ur0n Oct 12 '15 at 13:57
  • I now see it was asked 5 month ago. Did u get it resolved? – Zloj Oct 23 '15 at 11:39
  • The reason people have asked about genymotion is that the second emulator is being accessed by IP on the localhost host suggesting it is a virtual machine such as VirtualBox running a genymotion Android instance. The odd thing is that it's port is one higher than the emulator "id" which is a big coincidence... Did the problem go away when you updated the SDK version? Did you identify the problem and get it fixed? If so could you tell us what happened, even after all this time it looks like 11 people thought this was interesting enough to vote up. – Protonflux Oct 14 '16 at 16:21

1 Answers1

1

"unknown-sdk" is what it tells adb while the emulator is still busy loading itself.

Boken
  • 4,825
  • 10
  • 32
  • 42
Pnemonic
  • 1,685
  • 17
  • 17