Current time: 09-21-2019, 06:56 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
10-15-2011, 04:17 AM
Post: #1
WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
I have a private instance of WPT 2.4 and I'm having trouble configuring wptdriver. Is it possible to configure wptdriver.ini so that a single instance of wptdriver can serve requests to execute a WPT test sceario in either Chrome or Firefox?
Find all posts by this user
Quote this message in a reply
10-15-2011, 04:33 AM
Post: #2
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
Yes. The sample locations.ini and wptdriver.ini from the zip file is already configured to run both Chrome and firefox.

In locations.ini (on the server) you put all of the browsers supported by wptdriver.ini in a single location:

browser=Chrome,Firefox,Firefox 3,Chromium

Then in wptdriver.ini you just need sections that match each of the defined browsers:

[Chrome]
...

[Firefox]
...

[Firefox 3]
...

[Chromium]
...

I have run IE, Chrome, Firefox 3.6 and Firefox 7 all on the same test machine (note, you will need an updated agent if you want to test Firefox < 4, there were some bugs I had to fix after the 2.4 release).
Visit this user's website Find all posts by this user
Quote this message in a reply
10-15-2011, 05:58 AM
Post: #3
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
(10-15-2011 04:33 AM)pmeenan Wrote:  Yes. The sample locations.ini and wptdriver.ini from the zip file is already configured to run both Chrome and firefox.

In locations.ini (on the server) you put all of the browsers supported by wptdriver.ini in a single location:

browser=Chrome,Firefox,Firefox 3,Chromium

Then in wptdriver.ini you just need sections that match each of the defined browsers:

[Chrome]
...

[Firefox]
...

[Firefox 3]
...

[Chromium]
...

I have run IE, Chrome, Firefox 3.6 and Firefox 7 all on the same test machine (note, you will need an updated agent if you want to test Firefox < 4, there were some bugs I had to fix after the 2.4 release).

Thank you, Sir. I have everything working correctly now!Big Grin
Find all posts by this user
Quote this message in a reply
10-18-2011, 09:17 AM
Post: #4
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
Hi Patrick, I have configured a private instance with Chrome 14. Simple navigation tests are running just fine.The problem is with scripted tests they are taking too long to complete, first and repeat view both are timing out. I increased the time limit in wptdriver.config, but the tests are taking more than 10 minutes to complete. My scripts are using ssl channel.

Here is my wptdriver.ini:
Quote:[WebPagetest]
url=http://wpt-host-ip/
location=myLocation
Key=myKey

[Chrome]
exe="C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe"
options='--load-extension="%WPTDIR%\extension" --user-data-dir="%PROFILE%" --new-window --no-proxy-server --no-first-run --no-default-browser-check --enable-experimental-extension-apis'

[Firefox]
exe="C:\Program Files\Mozilla Firefox\firefox.exe"
options='-profile "%PROFILE%" -no-remote'
template=firefox

Could you guess what could be the reason for such a long time to a scripted test completion?
Thanks
Find all posts by this user
Quote this message in a reply
10-18-2011, 10:18 PM
Post: #5
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
I'd recommend incrementally building up the script from a single navigation command to the full script and see where the problem is coming from. Could be that one of the steps has a bunch of background activity that causes each step to take 1-2 minutes (and maybe you need to force it to stop measuring at onload instead of the default which is until network activity stops).
Visit this user's website Find all posts by this user
Quote this message in a reply
10-20-2011, 11:42 AM
Post: #6
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
Hi Patrick,

Thanks for the suggestion!
So, when I started building the script incrementally, the first step itself, which entering the log-in credentials is taking too long. Also, when the script is complete, the window does not close for a long time for the repeat view to begin. Also, I am seeing requests to some domains which are not there in normal operation, for e.g., there are requests being made to godaddy.com and safebrowsing.clients.google.com which I do not see when testing with IE7 or IE8.

Thanks!
Find all posts by this user
Quote this message in a reply
10-20-2011, 10:44 PM
Post: #7
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
Those are probably for things like SSL certificate revocation checks and other browser features that differ between Chrome and IE.

Any chance the site is available publicly so I could help debug the script or measurement issues (ping me off-board at pmeenan@webpagetest.org)?
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2011, 12:06 PM
Post: #8
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
How do I specify which browser to run tests on a multi-browser location using Restful API:
http://private-wpt/runtest.php?url=example.com&f=xml&k=12345&location=LOC_CH_FF_FF3

Assuming LOC_CH_FF_FF3 is running Chrome, Firefox (latest) and Firefox 3.
Find all posts by this user
Quote this message in a reply
12-17-2011, 12:01 AM
Post: #9
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
LOC_CH_FF_FF3.DSL:Chrome or LOC_CH_FF_FF3:Chrome (depending on if you want to specify connectivity).

sorry, it's kind of ugly but that scheme worked cleanest for the code structure.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-17-2011, 11:09 AM
Post: #10
RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox
Thanks Patrick, it works!
Do you mind updating the docs (https://sites.google.com/a/webpagetest.o...stful-apis) when you have the time?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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