nowol79 / webpagetest

weboagetest.org private instance docker build file
22 stars 18 forks source link

How to set locations... #5

Open michelob opened 8 years ago

michelob commented 8 years ago

Hi @nowol79

Thank you very much for this helpful image. However, I cannot seem to get it to run with any locations.

In the last commit, it seems to trail off explaining how to set the locations.ini and other *.ini files when running the image.

https://github.com/nowol79/webpagetest/commit/1846dc9205dd9e64c0249cb5392dad1759d2fc90

"After webpagetest running, Test Location has not yet been connected. Let's set the PC/Mobile location through location.ini"

Can you update the read me with instructions on how to set locations?

Thank you!

joacim-boive commented 7 years ago

I second that - it's not clear how to setup locations.ini.

pedro93 commented 7 years ago

Has anyone been able to add locations? If so could you share :) ?

nowol79 commented 7 years ago

Sorry. The answer is late. 😿

First, I modified the location.ini file a bit.

[locations]
1=PC
2=Mobile
Default=PC

[PC]
1=PC_Agent
label="DeskTop PC agent"
group=Desktop

[Mobile]
1=Mobile_Agent
label="Mobile agent - NEXUS_5"
group=Mobile Devices

[PC_Agent]
browser=Chrome,Firefox,IE9
label="NAVER GreenFactory Desktop"

[Mobile_Agent]
browser=NEXUS_5 - Chrome
label="NAVER GreenFactory NEXUS_5"
type=nodejs,mobile
connectivity="WiFi"

from the location.ini settings.. There are two agents. (PC & Mobile). You must install each one in advance.

  1. PC_Agent install Reference , https://sites.google.com/a/webpagetest.org/docs/private-instances
Test Machine(s)

Install the browsers you want to use for testing
Configure the test system to automatically log-on to an administrator account. The easiest and most reliable way for this to work is to use the autologon app from Microsoft Technet.
Disable any screen savers (the desktop needs to remain visible for the video capture to work)
Disable UAC (Vista or later - slide to "never notify")
Uninstall IE Enhanced-Security Mode (Windows Server)
Force windows to use a stable clock if running in a VM (particularly KVM)
/USEPMTIMER to boot.ini for XP or Server 2003
"bcdedit /set {default} useplatformclock true" from an administrator shell otherwise
Configure Windows to boot directly to the desktop (Server 2012)
Install desktop experience
http://www.win2012workstation.com/tag/start-screen/#manual
Disable Shutdown Event Tracker (Windows Server - for convenience)
run gpedit.msc
Open "Computer Configuration\Administrative Templates\System"
Open "Display Shutdown Event Tracker"
Set it to disabled
Copy the test software from the agent folder to the system (to "c:\webpagetest" for this example)
For pre-Windows 8.1 (or server 2012 R2) test agents, Install the DUMMYNET ipfw driver
If you are installing on 64-bit Windows, right-click on  "testmode.cmd" in the c:\webpagetest\dummynet\64bit folder and select "Run as Administrator".  Reboot the system to enable testmode.  If you do not run this then traffic shaping will not work after a reboot.
Copy the files from either the webpagetest\dummynet\32bit or webpagetest\dummynet\64bit directory into the webpagetest\dummynet directory (depending on your OS)
Pull up the properties for the Network Adapter that is used to access the Internet
Click "Install"
Select "Service" and click "Add"
Click "Have Disk" and navigate to webpagetest\dummynet
Select the ipfw+dummynet service (and click through any warnings about the driver being unsigned)
Windows 10, if testing with Microsoft Edge (work in progress):
Install Python 2.7 for all users to c:\Python27 (default install directory)
Install selenium from a cmd shell
c:\Python27\Scripts\pip install selenium
Install pyWin32 from the agent folder (may need to be run from an administrator command prompt)
Install Imagemagick
Install Windows Performance Toolkit (uncheck all of the other options from the adk setup)
You need a separate machine/VM for each version of IE but the rest of the browsers can all be run on the same machine and share a machine with IE (tests will not run at the same time, they will alternate)
Create a task scheduler task to run wptdriver.exe at logon:
Configure it to run with the highest privliges
Have it run at logon of the user account
Make sure it is not configured to terminate after 3 days (the default task scheduler configuration)
Make a copy of the settings file (wptdriver.ini) based on the sample
wptdriver can automatically install Chrome and Firefox (and keep Firefox up to date). If you would prefer to manually install the browsers then remove the installer=... entry for each of the browsers you want tp manually install
Make sure the path to the browser executables are correct for your system (if you are automatically installing Chrome and Firefox they will only install after the first time you run wptdriver)
Configure the location to match the location defined on the server in locations.ini
Configure the location key to match the server in locations.ini
Make sure the available browsers in the ini file match the list defined in locations.ini in the browsers=x,y,z entry for the location.
Launch wptdriver and let it install any software it needs to install (exit when it gets to "waiting for work").
Reboot to make sure everything starts up correctly
If you connect a remote desktop to the test machine, make sure to reboot the machine when you are done, otherwise the desktop will remain locked and screen captures will not work.
  1. Mobile_Agent install

https://sites.google.com/a/webpagetest.org/docs/private-instances/node-js-agent/setup