WebPageTest is an amazing tool for testing performance. However, unlike running Chrome Dev Tools locally, it runs on an outside server. If our Shopify preview site requires a password, testing it becomes a challenge. Luckily we can use the scripting feature in WebPageTest to overcome this obstacle.
In this short video, I walk you through all the steps to use WebPageTest for preview sites with passwords:
Here is the pattern for the script code:
setCookie origin name=value
navigate page
And here is an example of using that pattern to set the storefront_digest
cookie on the origin then navigating to a product page to test:
setCookie https://studiosia.myshopify.com/ storefront_digest=6do1not2share3publicly3f0
navigate https://studiosia.myshopify.com/products/fine-art-print
New to WebPageTest? Check out Benchmark and compare tests using WebPageTest.