Current time: 10-17-2019, 08:58 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simulate lossy network conditions for mobitest agents
08-15-2013, 06:16 AM
Post: #1
Simulate lossy network conditions for mobitest agents
Hi,

I am running WPT private instance (wpt 2.11) in Windows Server 2008 R2 standard locally (64 bit) with both desktop agents (only wptdriver -chrome, FF, IE10, safari) and mobitest ones. I would like to know whether we could:

1. Simulate less than optimal network conditions - 3G Average/lossy/good connectivity on the mobitest Agents by configuring any settings in the WPT app or on the server side. I know that we could achieve this through "Network Link conditioner" on iOS 6 developer devices, but would like to do the same on the server side
instead. For desktop agents i do see that it gives various options for Connection (advanced settings) such as mobile 3G, DSL, etc... and not when i select a mobitest agent (iPhone/iPad shows only 3G as option).

2. How can i get a separate TAB for my private instance for mobitest agent testing (like in http://www.webpagetest.org/mobile) and shows my iOS devices there ?

3. Whats this "Script" Tab for in the advanced settings ?

Thanks.
Find all posts by this user
Quote this message in a reply
08-15-2013, 10:51 PM
Post: #2
RE: Simulate lossy network conditions for mobitest agents
(08-15-2013 06:16 AM)wpt-ny7 Wrote:  Hi,

I am running WPT private instance (wpt 2.11) in Windows Server 2008 R2 standard locally (64 bit) with both desktop agents (only wptdriver -chrome, FF, IE10, safari) and mobitest ones. I would like to know whether we could:

1. Simulate less than optimal network conditions - 3G Average/lossy/good connectivity on the mobitest Agents by configuring any settings in the WPT app or on the server side. I know that we could achieve this through "Network Link conditioner" on iOS 6 developer devices, but would like to do the same on the server side
instead. For desktop agents i do see that it gives various options for Connection (advanced settings) such as mobile 3G, DSL, etc... and not when i select a mobitest agent (iPhone/iPad shows only 3G as option).


You can't do it on a per-test basis but you can do the traffic shaping externally if you want to. The Dulles mobitest agents go through a wifi access point that is connected to a linux PC that serves as a bridge to their Internet connection and dummynet is run on the bridge (with a mask based on the IP address of the phone so that each phone gets a dedicated pipe).

Quote:2. How can i get a separate TAB for my private instance for mobitest agent testing (like in http://www.webpagetest.org/mobile) and shows my iOS devices there ?

You can't, at least not without coding up a completely different page. That mobile tab code is just posting tests to the public mobitest instance and doesn't interact with the webpagetest server itself at all. You can set up a separate location in the location dropdown that is dedicated to the mobile agents if you'd like (and with recent releases you can even group them if you have more than one mobile location).

Quote:3. Whats this "Script" Tab for in the advanced settings ?

The Script tab is for running more complex tests that interact with pages or use some advanced features (there should be a link to the documentation for it). Things like logging into a site, multi-page navigations, custom http headers, etc.

The scripting isn't supported for the mobile agents though, just the desktop ones (like a lot of the advanced features).
Visit this user's website Find all posts by this user
Quote this message in a reply
08-16-2013, 02:56 AM
Post: #3
RE: Simulate lossy network conditions for mobitest agents
Hi Patrick, Thanks a lot.
For:
reply 1>) so i can create a new wifi access point which has a dummynet firewall rules which would:
(i) Create different pipes with different bandwidths (ipfw pipe 1 config bw xx).
(ii) Assign the pipe to a particular mobile IP#. (ipfw add pipe 1 ip from <IPhone IP#/subnet#> to any)
is this right ?

reply 2>) I am ready to tweak some code if needed, so how are you actually posting tests to the public mobitest instances ? Is it from runtest.php ? Can i do the same for my private mobile test agents ?

An additional Question:
4.) How can i fire requests for agents in MAC OSX ?
I believe a wptdriver agent is required to be installed to get them polling for requests ?

Thanks in advance.
Find all posts by this user
Quote this message in a reply
08-16-2013, 03:36 AM
Post: #4
RE: Simulate lossy network conditions for mobitest agents
(08-16-2013 02:56 AM)wpt-ny7 Wrote:  Hi Patrick, Thanks a lot.
For:
reply 1>) so i can create a new wifi access point which has a dummynet firewall rules which would:
(i) Create different pipes with different bandwidths (ipfw pipe 1 config bw xx).
(ii) Assign the pipe to a particular mobile IP#. (ipfw add pipe 1 ip from <IPhone IP#/subnet#> to any)
is this right ?

Yep. If you want to have multiple phones share the same profile make sure to add mask dst/src ip rules to the end of the pipe configs. That will make sure that each phone is traffic shaped separately.

You might also want to bypass traffic shaping for traffic to the WPT server so test results can be uploaded quickly. I also allow SSH and VNC to bypass (which I use to manage some of the devices).

Here is what the rules look like on my bridge:

Code:
/usr/local/sbin/ipfw -q flush
/usr/local/sbin/ipfw -q pipe flush

# 3G profile - 1.6Mbps down, 768Kbps up, 300ms RTT
/usr/local/sbin/ipfw pipe 1 config bw 1600Kbit/s delay 150 noerror mask dst-ip 0xffffffff
/usr/local/sbin/ipfw pipe 2 config bw 768Kbit/s delay 150 noerror mask src-ip 0xffffffff

# traffic to bypass shaping
/usr/local/sbin/ipfw add skipto 60000 proto tcp src-ip 72.66.115.10
/usr/local/sbin/ipfw add skipto 60000 proto tcp dst-ip 72.66.115.10
/usr/local/sbin/ipfw add skipto 60000 proto tcp src-port 5900
/usr/local/sbin/ipfw add skipto 60000 proto tcp dst-port 5900
/usr/local/sbin/ipfw add skipto 60000 proto tcp src-port 22
/usr/local/sbin/ipfw add skipto 60000 proto tcp dst-port 22

# traffic we need to shape
/usr/local/sbin/ipfw add pipe 1 ip from any to 192.168.0.0/16 out via br0
/usr/local/sbin/ipfw add pipe 2 ip from 192.168.0.0/16 to any out via br0

/usr/local/sbin/ipfw add 60000 allow ip from any to any

Quote: reply 2>) I am ready to tweak some code if needed, so how are you actually posting tests to the public mobitest instances ? Is it from runtest.php ? Can i do the same for my private mobile test agents ?

The form itself (mobile.php) is set up to post to the mobitest server. You can change it to post to runtest.php instead which should work reasonably well as long as you configure the location ID's (they are hard-coded in mobile.php).

Quote:
An additional Question:
4.) How can i fire requests for agents in MAC OSX ?
I believe a wptdriver agent is required to be installed to get them polling for requests ?

What agents in OSX? The desktop agents are windows-only. If you use the JS agent (experimental still) it should work across platforms with Chrome.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-16-2013, 11:20 PM
Post: #5
RE: Simulate lossy network conditions for mobitest agents
Excellent info to get things going. :)Thanks a lot Patrick.

For Reply 3.)
As far as the script part is concerned, can we script it in such a way that
it records data for multiple steps within the same script (using logData 1 statement). For example i goto
i. http://www.example.com (dont record)
ii.Record data for http://www.example.com/videos/xyz.mp4 (logData 1).
iii. Record data for http://www.example.com/schedules/march.schedule
(logData 1).
iv. end.
Would the results Link be showing separate tests results for each step
(2,3) ?
Quote:The scripting isn't supported for the mobile agents though, just the desktop ones (like a lot of the advanced features).
Would there be a way for us to script (automated firing) our mobitest agents.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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