Current time: 12-16-2019, 03:52 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WPT location reorganization
10-13-2016, 01:08 AM
Post: #1
WPT location reorganization
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) ?
Find all posts by this user
Quote this message in a reply
10-13-2016, 05:45 AM
Post: #2
RE: WPT location reorganization
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.
Find all posts by this user
Quote this message in a reply
10-13-2016, 06:00 AM (This post was last modified: 10-13-2016 06:00 AM by shmilla.)
Post: #3
RE: WPT location reorganization
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
Find all posts by this user
Quote this message in a reply
10-13-2016, 07:34 AM
Post: #4
RE: WPT location reorganization
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.o...nnectivity

So I'm going to update my code for that.
Find all posts by this user
Quote this message in a reply
10-13-2016, 02:31 PM (This post was last modified: 10-13-2016 02:34 PM by shmilla.)
Post: #5
RE: WPT location reorganization
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)