sitespeedio / sitespeed.io

sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.
https://www.sitespeed.io/
MIT License
4.75k stars 602 forks source link

Run Webpagetest basic auth using dockerized sitespeed #1892

Closed bharat129 closed 6 years ago

bharat129 commented 6 years ago

Hi @soulgalore ,

I am running Webpagetest using sitespeed, I am able to do it on a website with no basic auth. But when I am trying to run WPT on site with basic auth, it does not work since I could not find any config how to run webpagetest with basic auth.

command to run:

docker-compose -f /www/sitespeed/docker-compose.yml run -v /www/sitespeed:/sitespeed.io sitespeed.io https://xxx.xxx.com/ --webpagetest.key= --webpagetest.runs=1 --webpagetest.location=Toronto:Chrome --graphite.host=graphite

Can you please let me know how to modify this command for basic auth?

soulgalore commented 6 years ago

Hi @bharat129 we use the WebPageTest API (read more on how we use it here https://www.sitespeed.io/documentation/sitespeed.io/webpagetest/#configuration) and pass on all configuration. If you check https://github.com/marcelduran/webpagetest-api#test-works-for-test-command-only it looks like --webpagetest.login and --webpagetest.password should do the trick!

All the best Peter

bharat129 commented 6 years ago

Thanks @soulgalore , WPT is running now after adding your suggested options.

But the command also trigger sitespeed run. Do we have any configuration available which can disable sitespeed run during webpagetest run?

I have separate command to run sitespeed, don't want extra overhead on the server.

soulgalore commented 6 years ago

Do you mean to disable getting metrics using Browsertime? https://www.sitespeed.io/documentation/sitespeed.io/webpagetest/#run-webpagetest-without-browsertime

bharat129 commented 6 years ago

Thanks again @soulgalore , But --plugins.remove=browsertime only did not work, I also had to put --speedIndex=false in my WPT command

soulgalore commented 6 years ago

Hm what version of sitespeed.io do you use, are you on 6.x? That's how you should do to disable plugins.

soulgalore commented 6 years ago

Didn't get any feedback in this, disabling browsretime should work. Please show exactly how you run so we can reproduce.