Page Performance collector using WebDriver API ,BrowserMobProxy and HarStorage
- Ant and JDK 1.7 needed, setting the ANT_HOME, JAVA_HOME and Path correctly
- Install and start MongoDB
- Install Python 2.7.2+(Windows x86 MSI Installer (2.7.4)), add Python directories to the system path:C:\Python27;C:\Python27\Scripts;
- Install PyGTK bundle (All-in-one): pygtk-all-in-one-2.24.2.win32-py2.7.msi
- Install pyrsvg: pyrsvg-2.32.1.win32-py2.7.msi
- Install setuptools : setuptools-0.6c11.win32-py2.7.exe
- run following commands(setting proper proxy if needed): easy_install pylons==1.0
easy_install webob==0.9.8
easy_install pymongo - download harstorage-1.0-py2.7.egg and run easy_install harstorage-1.0-py2.7.egg
- Create a skeleton config file for your application instance called production.ini: paster make-config "harstorage" production.ini
- specifying the config file you want to set up : paster setup-app production.ini
- run HAR Storage using the Paste HTTP server: paster serve production.ini
- check the http://127.0.0.1:5000 to see if harstorage page is showing up
- download jenkins.war,and start it as local console mode: java -jar jenkins.war
- create the testing job to do the periodic running against the env under test
*Notice:
If you want to test with Chrome Browser, please download your ChromeDriver from: http://code.google.com/p/chromedriver/downloads/list, unzip it and configure your chromedriver.exe path in globalpara.xml under conf file
If you want to test with IE Browser, please download you IEDriver from: http://code.google.com/p/chromedriver/downloads/list, unzip it and configure your IEDriverServer.exe path in globalpara.xml under conf file;
also, you need to enable all zones to protected mode from Internet Options security settings
- Download and unzip the Mole project code to your local machine(configure the global parameter file needed to align with your local settings*)
- Execute mongodb.bat and harstorage_cmd.bat to start the mongo and harstorage services
- Run "ant deploy" in cmd window, the "\target" folder will be generated
- Execute "Runner.bat" under "\target" directory to launch the tests
- Check out the harstorage web page from:http://localhost:5000/
*Notice: Serveral Parameters you may need to change on demand:
1> In harstorage_cmd.bat file, you need to configure the harstorage installation path
2> In mongodb.bat file, you need to configure the mongodb installation directory and --dbpath
3> In /conf/globalPara.xml file, you need to set chromedriverpath and harstoragehost on your local machine
4> Set /test/testng.xml file based on your test needs
5> If you want to run the test continously, you can download jenkins.war, and run "java -jar jenkins.war" to make a periodic job
- Download browsermob-proxy from https://github.com/webmetrics/browsermob-proxy/downloads. Unzip it.
- Double-click cybervillainsCA.cer in %PROXY_HOME%/ssl-support/.
- Click the button "Install Certificate".
- Click the button "Next" to continue.
- Choose "Place all certificates in the following store" to specify a location. Click the button "Browse" and select "Trusted Root Certification Authorities" as certificate store.
- Click the Button "Finish", "Yes", "OK" to complete configuration.
- cd directory
- git status (to check your recent changes on your local repo)
- git add . (add all the changes you made)
- git status
- git commit -m "any comments"
- git push
- git reset HEAD (convert your local changes)
- git checkout .
- git pull