Current time: 12-12-2018, 05:58 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Differences in .HAR files generated by selenium web driver with BrowserMob and webpag
06-08-2012, 03:11 AM
Post: #1
Differences in .HAR files generated by selenium web driver with BrowserMob and webpag
Hello,


I have generated .HAR files using Selenium Web Driver with BrowserMob Proxy(SWD+BM) and by using webpagetest.org(WPT). I used HAR Storage to view these files. The following are the differences I found.

a. All the sizes and times(Load Time, DNS Time, Transfer Time etc.) shown in SWD+BM are less compared to WPT.

b. No. of resources by request(images, css, html etc. ), resources by size, domains by request, domains by size in SWD+BM are less in number or equal to(mostly less) when compared to WPT.

I have used Firefox browser for the both.

Why are these differences? Is there any architecture difference b/w these two?

The code I used for BMP is:

import java.io.FileOutputStream;
import org.browsermob.core.har.Har;
import org.browsermob.proxy.ProxyServer;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;

public class SeleniumWDBMHAR {

public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
ProxyServer server = new ProxyServer(4461);
server.start();
server.setCaptureHeaders(true);
server.setCaptureContent(true);
// get the Selenium proxy object
org.openqa.selenium.Proxy proxy = server.seleniumProxy();
// configure it as a desired capability
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.PROXY, proxy);

// start the browser up
WebDriver driver = new FirefoxDriver(capabilities);

server.newHar("xxx");


driver.get("xxx");

// get the HAR data
Har har = server.getHar();
String strFilePath = "Selenium_test.har";
FileOutputStream fos = new FileOutputStream(strFilePath);
har.writeTo(fos);
server.stop();
}

}
Find all posts by this user
Quote this message in a reply
06-08-2012, 03:25 AM
Post: #2
RE: Differences in .HAR files generated by selenium web driver with BrowserMob and webpag
For the times I would fully expect WPT to be slower because we inject the traffic shaping to make it look like a DSL connection.

I'm not sure how the BrowserMob Proxy works but if the browser knows it is going through a proxy then it will radically change it's connection behavior so things will look quite a bit different. Do you know if the BM Proxy passes all of the headers through or if it really proxies the requests? Just wondering if it honors the gzip encoding, etc.

Do you have Flash installed on your Firefox test agent?

Is all of the content guaranteed to be identical or are there ads or other content that could vary depending on location or time?

Are you using the same version of Firefox in both cases?

You'll probably want to look at each individual resource to see if the content is the same and things are just counted slightly differently or if the content itself is different.

Thanks,

-Pat
Visit this user's website Find all posts by this user
Quote this message in a reply
06-08-2012, 07:38 AM
Post: #3
RE: Differences in .HAR files generated by selenium web driver with BrowserMob and webpag
Hello Meenan,

Thanks for the reply.

The following are the answers to your questions

1) I have to find out whether BMP proxies the requests. I am very new to this field.

2) I have flash installed on my Firefox test Agent.

3) yes the content changes depending on location and time.

4) I haven't used any Firefox settings in the code for BMP. I have Firefox 12 installed on my machine. In WPT, I have selected just Firefox I dont know what version it is.

Thanks,
Raghu.

(06-08-2012 03:25 AM)pmeenan Wrote:  For the times I would fully expect WPT to be slower because we inject the traffic shaping to make it look like a DSL connection.

I'm not sure how the BrowserMob Proxy works but if the browser knows it is going through a proxy then it will radically change it's connection behavior so things will look quite a bit different. Do you know if the BM Proxy passes all of the headers through or if it really proxies the requests? Just wondering if it honors the gzip encoding, etc.

Do you have Flash installed on your Firefox test agent?

Is all of the content guaranteed to be identical or are there ads or other content that could vary depending on location or time?

Are you using the same version of Firefox in both cases?

You'll probably want to look at each individual resource to see if the content is the same and things are just counted slightly differently or if the content itself is different.

Thanks,

-Pat
Find all posts by this user
Quote this message in a reply
06-19-2012, 02:06 PM
Post: #4
RE: Differences in .HAR files generated by selenium web driver with BrowserMob and webpag
@All:

I have posted the same question in other forums. Below are the links. You can find some more information here.

http://stackoverflow.com/questions/10923...ifferences

https://groups.google.com/forum/?fromgro...wkOW0toNu4



(06-08-2012 07:38 AM)raghu.snist Wrote:  Hello Meenan,

Thanks for the reply.

The following are the answers to your questions

1) I have to find out whether BMP proxies the requests. I am very new to this field.

2) I have flash installed on my Firefox test Agent.

3) yes the content changes depending on location and time.

4) I haven't used any Firefox settings in the code for BMP. I have Firefox 12 installed on my machine. In WPT, I have selected just Firefox I dont know what version it is.

Thanks,
Raghu.

(06-08-2012 03:25 AM)pmeenan Wrote:  For the times I would fully expect WPT to be slower because we inject the traffic shaping to make it look like a DSL connection.

I'm not sure how the BrowserMob Proxy works but if the browser knows it is going through a proxy then it will radically change it's connection behavior so things will look quite a bit different. Do you know if the BM Proxy passes all of the headers through or if it really proxies the requests? Just wondering if it honors the gzip encoding, etc.

Do you have Flash installed on your Firefox test agent?

Is all of the content guaranteed to be identical or are there ads or other content that could vary depending on location or time?

Are you using the same version of Firefox in both cases?

You'll probably want to look at each individual resource to see if the content is the same and things are just counted slightly differently or if the content itself is different.

Thanks,

-Pat
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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