Current time: 10-19-2019, 07:14 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wpt_batch.py with chrome mobile emulation
01-15-2015, 04:47 AM
Post: #1
wpt_batch.py with chrome mobile emulation
Currently we run all of our tests via wpt_batch.py and have the xml result files stored externally for trend reporting. I would like to force some tests that I run from batch to run in Chrome mobile emulation mode on our local/private instance agents.

wpt_batch.py doesn't have an option for enabling chrome mobile emulation so I am trying to figure out another method easier than creating a real mobile agent on site. Could I create a new agent entirely and set the Chrome application executable (in a WPT script that launches chrome) to run permanently with --window-size=360,640, for example?

Or is there an easier method to accomplish this? Our sites are 100% responsive so the most important thing for me right now is being able to change the browser or screen size to a smaller form factor to compare loading and kb to desktop/full browser mode. I am not as concerned right now with testing on different os/mobile platforms.
Find all posts by this user
Quote this message in a reply
01-15-2015, 04:54 AM
Post: #2
RE: wpt_batch.py with chrome mobile emulation
Mobile emulation is literally just passing one more option to the runtest.php call (mobile=1). You're a LOT better off just adding it in to the wpt_batch.py

Otherwise you can use a script with the setviewport command to resize to whatever responsive size you want to test. You can use a static script that would work with all of the urls.

Something like:
Code:
setViewportSize    360    640
navigate    %URL%

That will automatically substitute the URLs being tested into the script and resize the browser before loading it.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-15-2015, 05:29 AM
Post: #3
RE: wpt_batch.py with chrome mobile emulation
Works perfectly. I will just keep a wpt_batch.py and a second wpt_batch_mobile.py with the following change. Thanks again Patrick.

def RunBatch(options):
"""Run one-off batch processing of WebpageTest testing."""

test_params = {'f': 'xml',
'private': 1,
'mobile': 1,
'priority': 6,
'video': options.video,
'fvonly': options.fvonly,
'runs': options.runs,
'location': options.location,
'mv': options.mv
}
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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