Questions on WPT scripting (chaotic film-strip and individual HAR pages)

I am trying to play around with WPT scripting. I simulated a checkout workflow with Amazon.com (http://www.webpagetest.org/result/150109_8G_XSY/) with the following script:

navigate	amazon.com
setValue	name=field-keywords	nexus 6
submitForm	name=site-search
clickAndWait	title=Google Nexus 6 (32GB, Midnight Blue)
clickAndWait	name=submit.add-to-cart
clickAndWait	id=hlb-ptc-btn-native

I found a couple of things that seems incorrect:

  1. The film-strip view and the video, both are in the wrong order with respect to the actual timeline. For instance, the very first image in the film-strip should actually be the very last image in the actual timeline. Also many of the other images in the film-strip are in a chaotic order.

  2. There doesn’t seem to be a provision to request multiple “HAR pages”. For instance, the script actually navigates through the landing page, the search result page, the item page and finally the checkout page. But, the HAR output has all the requests, but they are all mapped back to the very first landing page. This means, there is possibly no way to map back the requests to the actual base page URL which generated that request and more importantly, the page timings like “OnLoad time”, “Document Complete Time”, “First Byte Time”, “Start Render”, etc., are unavailable for each logically individual step in the transaction.

Are there any settings that might alleviate this problem? If not, are there any open tickets that might address the above issues?

From the scripting docs:

The hosted scripts can only have one step that produce data (see below for examples on how to suppress results for intermediate steps)

You can either put “combinesteps” as the first command or just measure a single transaction with “logData 0/1”.

There is a pull request in flight to allow for measuring multiple steps in a sequence all in one go but it’s going to take a while to merge in.

Pat, thanks much for the response. I took a look at the pull request #376 and ended up watching the demos in the Velocity 2014 conference. It was pretty useful as I got a glimpse of the multi-step measurement in action.

I was wondering if you have a timeline in mind for when the multistep measurement might be merged with master?

Probably a few months to get it all merged in (maybe less but it’s a pretty big change).