WebPagetest Forums
WPT location reorganization - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: WPT location reorganization (/showthread.php?tid=14549)



WPT location reorganization - shmilla - 10-13-2016 01:08 AM

My tool pulls locations dynamically using getLocations.php and uses the location ID when submitting tests as the location. My team noticed that the list has changed in the last day or two. I was wondering how to fix my logic to accommodate this.

So what used to be
dulles: IE8
dulles: IE9
dulles: chrome
dulles: Firefox
etc

is now broken up into

dulles
dulles_IE8
dulles_IE9

Where dulles has "chrome, canary, firefox, etc" listed as browsers (that's why Dulles:Firefox is not on the list anymore)

Before, I would just take location and send in my runTest call:
&location=(location ID)

Is the way to fix this to get the ID, parse the browser list, and send location as:
(locationID) : (parsed browser name) ?


RE: WPT location reorganization - themark - 10-13-2016 05:45 AM

Yep. I just noticed this as well. I'm working on fixing up my script now. Thinking I'll probably do something similar to what you mentioned.


RE: WPT location reorganization - shmilla - 10-13-2016 06:00 AM

I couldn't find any docs that said the proper syntax (location.browser, location:browser, etc).. if you figure it out, can you post? I'm going to try to find time later in the week to try to code the fix


RE: WPT location reorganization - themark - 10-13-2016 07:34 AM

i think the locations parameter is still the same. I just tested with: /runtest.php?url=www.amazon.com&location=us-east-1:Chrome&runs=1&fvonly=1&keepua=1&f=xml&k=.... and it worked fine. So the location parameter accepts location:browser.connectivity per https://sites.google.com/a/webpagetest.org/docs/advanced-features/webpagetest-restful-apis#TOC-Specifying-connectivity

So I'm going to update my code for that.


RE: WPT location reorganization - shmilla - 10-13-2016 02:31 PM

Hey Mark, thanks... so I'll one up this piece of info...

So in my older instances I would look up
location/location
location/Browser

but comparing XML I notice it's now
location/location
location/Browsers (note the extra "s")

In my code I now test for location/Browsers, if I don't see it, I test for location/Browser so my code is backward compatible (my tool is designed to work across WPT installations/instances)

Then I just list each.. i.e.

Code:
location = get nodes for (//location)
for each  location
  curlocation = /location
  browserlist = try to get /Browsers or /Browser
  browserarray = browserlist.split(",")
   for each browser in browserarray
     list curlocation:browser