catchpoint / WebPageTest.bulk-tester

Google App Script for spreadsheet that uses the WPT API to bulk test URLs
MIT License
259 stars 22 forks source link

Resolved: Device emulation #32

Closed cweekly closed 3 years ago

cweekly commented 3 years ago

Hi Andy, Thanks again for an awesome tool!

I'm using the latest sheet v0.6. I know how to tweak the named ranges and run the "Update scenario columns" script. Using marcel duran's npm script, I can run webpagetest test <URL> ... --mobile --device iPhoneX (noting the "mobile" arg is required in order for "device" to work), and -- provided the specified device string (e.g. "iPhoneX") is defined in my private instance's mobile_devices.ini -- it works properly.

But with the gsheet, with "device" and "mobile" columns added to the scenarios, the tests only ever run with "Emulated Motorola G (gen 4)", ie the default mobile device. Omitting the "mobile" param, or reversing the column order, has no effect.

I think it's a bug. Will keep an eye out for any response here and do what I can to help ensure it's reproducible.
Slainte, CW

cweekly commented 3 years ago

w00t! I read the API's source code, which revealed the existence of a "mobileDevice" parameter.

Native API: WORKS: /runtest.php?mobileDevice=iPhoneX...

Node API wrapper: WORKS: webpagetest test ... --mobile --device iPhoneX ... // IIRC mobile must precede device

WPT-Bulk-Tester: WORKS! √ 2 columns: "mobileDevice" (value: anything matching the server's mobile_devices.ini entries) "mobile" (value of "1")

So, this issue can be closed.

andydavies commented 3 years ago

Thanks @cweekly I'll take a look and see if I can work out what's happening

cweekly commented 3 years ago

Hey @andydavies your timing is amazing; I just figured it out. Thanks though! :)

OCD PS FTR, the comment sequence looks weird because was actively editing my previous comment (instead of adding a new one) when Andy weighed in. /OCD