Current time: 07-20-2018, 08:59 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Differences between running a test through the API and the site
08-16-2013, 07:53 AM
Post: #1
Differences between running a test through the API and the site
Hi,

I was expecting that the 2 scenarios below would give exactly the same results, but they don't:

Senario 1:
Make a GET request like this:
http://www.webpagetest.org/runtest.php?s...les:Chrome

Result 1:
http://www.webpagetest.org/screen_shot.p...15_02_1155

Senario 2:
Run the script from home page:
navigate http://jsfiddle.net/ygaras/8SfM8/
Result 2:
http://www.webpagetest.org/screen_shot.p...15_BD_110G

The difference is console output is missing under the screen shot screen when the test is run through the api.
I also noticed that the source of the script is only available if the the same browser session requested the test is trying to view it – seems like some kind of security feature?
Is the above behavior expected? Is there a way to make a request throughout the api and be able to view the console output and script source?

Thanks.
Find all posts by this user
Quote this message in a reply
08-17-2013, 12:05 AM
Post: #2
RE: Differences between running a test through the API and the site
Try passing timeline=1 with the API request. Timeline captures are enabled by default when you come in through the UI and that will get you the console messages.

Yes, the script is not displayed across user sessions (which is a bit complicated when you use the API) just in case there is sensitive information in the script (servers people don't want to expose, etc). If you run a private instance you can choose to expose the script results to all users.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-17-2013, 01:55 AM
Post: #3
RE: Differences between running a test through the API and the site
Thanks! setting timeline=1 made it work.
Do you think its default value should be 1 for API calls? I can make a pull request for that on github.
Find all posts by this user
Quote this message in a reply
08-20-2013, 11:09 PM
Post: #4
RE: Differences between running a test through the API and the site
I don't want to switch the defaults out from anyone that is doing automated testing. Maybe at some point in the future.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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