WebPagetest Forums
Emulator Android - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: Emulator Android (/showthread.php?tid=13047)



Emulator Android - Gedref - 06-19-2014 10:28 PM

Hi,

i would like to run test on emulator.
i use sdk avd android to create emulator
but when i start my emulator it doen't have serial number ?
How i could set it ?
i need serial number to execute wptdriver.bat

Thanks in advance
Gedref.


RE: Emulator Android - pmeenan - 06-19-2014 10:52 PM

When you run "adb devices" what does it list for the emulator? You should be able to run the agent without specifying a device ID but I've never tested it so it's possible that somewhere along the line it's failing when a device ID isn't specified.

I can't recommend against running tests inside of the emulator highly enough. It doesn't perform anything like a real device and I'm guessing that video capture will also suck if it even works. Getting a cheap Moto E or G works a whole lot better, even for development.


RE: Emulator Android - Gedref - 06-19-2014 10:57 PM

thanks pmeeman

When i run adb devices i have this result : emulator-5554 device

i take this to my parameter serialNumber when i execute .bat file

but it doesn't like "-"


I just would test on emulator, cause at this time i don't have any real device, so before i would try on emulator just to verify if all is running well


RE: Emulator Android - Gedref - 06-20-2014 06:13 PM

oh i see that my emulator android wasn't detected..
when i check 127.0.0.1/install
that tell me my android isn't connected


RE: Emulator Android - pmeenan - 06-20-2014 10:27 PM

The node agent will not poll for work until it can talk to the device and the server will not show an agent as connected until it polls for work so it all goes back to not being able to configure adb to not require a serial number for a device right now.


RE: Emulator Android - Gedref - 06-23-2014 10:48 PM

So i can't run test on emulator ?


RE: Emulator Android - pmeenan - 06-23-2014 11:39 PM

Not without fixes to the code. I'm out this week for Velocity so I probably won't get a chance to look at it until next week - though pull requests are always welcome if you want to take a crack at it.


RE: Emulator Android - pmeenan - 06-24-2014 03:36 AM

ok, had a few minutes to try it out and it turns out to be a super-easy fix: https://github.com/WPO-Foundation/webpagetest/commit/a940f5d5fe593d203ed15bca6e51a933192f1022

It's just a 2-character change to the regex check for device ID's to allow the - that is part of the emulator ID's.

I looked at allowing running without device ID's but it didn't work on my first attempt and I don't have time to look closer right now but the patch above should get you working.