Changes

Jump to: navigation, search
Introduction
[[http://zenit.senecac.on.ca/wiki/index.php/Firefox_Performance_Testing_:_A_Python_framework_for_Windows | Back to Firefox Performance Testing Project]]
=Introduction=
This documentation is the revised version of Annie Sullivan's [[Readme.txt]] for the Firefox Performance Testing.
 
Unfortunately, the Firefox Performance Testing is only catered to Windows users at this time.
=Hardware Requirements=
=Framework Prerequisites=
(List the sequence and provide sh script to automate this)
You'll need to download these before running performance testing:
* [http://www.python.org/ftp/python/2.4/python-2.4.msi Python 2.4]
=Framework Configuration=
==Configure the environment==
#Make sure the [[Firefox_Performance_Testing_:_A_Python_framework_for_Windows_Documentation#Framework_Prerequisites | prerequisites]] are installed.(sh script will automate this part - but get user to check)
#Make a directory for the framework:<pre>$mkdir C:\mozilla</pre>
#Download entire [http://www.yorku.ca/abel/liz/mozilla/PerfTestingWin32Win32PerfTesting_v4.zip Performance Testing Framework] (directories and all subdirectories) and put it in '''C:\mozilla'''(one of two options 1.put reports dir in the framework 2.check if it exists and prompt user if he/she wants it created)
==Configure the paths (paths.py)==
(Lots of work in this area.. paths.py is unclear, should specify that it can be modified and that these are just defaults.. and the paths are misleading because people think that they are commands for dos)
==Configure the paths (paths.py)==To setup the appropriate paths for the framework, open the '''paths.py''' file in '''C:\mozilla\testing\performance\win32\''' and configure the paths(CYGWIN, SYNC, BASE_PROFILE_DIR, REPORTS_DIR, INIT_URL, TS_URL, TP_URL):
*This is the path to the directory that the generated reports will go into
<pre>REPORTS_DIR = r'C:\mozilla\testing\performance\win32\extension_perf_reports'</pre>
*Create '''extension_perf_reports''' dir in '''C:\mozilla\testing\performance\win32\'''
OR
*Check that '''cycler.html''' is in '''C:\mozilla\testing\performance\win32\page_load_test'''
*'''Note: Don't change the local file url to a file path'''
 
=Config file=
==Config info==
(refer to Exended Progress Chart for yaml details - a few things have to be highlighted and clarified)
 
In '''C:\mozilla\testing\performance\win32\''', create a YAML config file (config.yaml) with info about the profiles you want to test. Copy, paste and '''modify''' the following in config.yaml or refer to [[sample.config]]:
<pre>
# Extensions to install in test (use "extensions: {}" for none)
extensions:
# Make sure that the path is directed to the desired location of the extension
# Need quotes around guid because of curly braces
"{12345678-1234-1234-1234-abcd12345678}" : c:\path\to\unzipped\xpi
==Instructions==
1. Check Verify that your the '''firefox ''' path is pointing to the right Firefox instance on your system.* You will hit a zero division error and some other errors if you don't point it to the rightpath
2. '''preferences''':* If you don't have '''preferences to set:*''', change to: <pre>preferences : {}</pre> (make sure there is a space between ":" and "{" or else it will cause a syntax error)* If you do have '''preferences''', refer to [[sample.config]]
3. '''extensions''':* If you don't have '''extensions ''' to install in test:*, change to: <pre>extensions: {}</pre> (make sure there is a space between ":" and "{" or else it will cause a syntax error)* If you do have '''extensions''' to install, refer to this sample:<pre> extensions: # Make sure that the path is directed to the desired location of the extension # Need quotes around guid because of curly braces "{12345678-1234-1234-1234-abcd12345678}" : c:\path\to\unzipped\xpi4 foo@sample. filename and title can be anythingcom : c:\path\to\other\unzipped\xpi </pre>* Make sure that the path to the extension is right
54. Run Change '''run_tests.pyfilename''' with the name of your config file as an argument in and '''c:\mozilla\testing\performance\win32\title''': <pre>$run_tests.py config.yaml</pre>to whatever you desire
*You can use a space-separated list of config files, to generate a report of startup and page load times5. *The report will be placed in the In '''REPORTS_DIRcmd''' directory you specified in , run '''pathsrun_tests.py'''with the name of your config file as an argument in '''c:\mozilla\testing\performance\win32\''': <pre>$run_tests.py config.yaml</pre>
* Running the test will close any existing Firefox windows. (this part has to be highlighted)
**You might run into this message on your browser: '''This page should close Firefox. If it does not, please make sure that the dom.allow_scripts_to_close_windows preference is set to true in about:config'''
**Type '''auto:config''' in the address bar and double click on '''dom.allow_scripts_to_close_windows''' to change it to true
* If you see '''processing... Performance Testing is starting''', performance testing is running.. wait..
* After the performance testing is done, your reports will be placed in the [[Firefox_Performance_Testing_:_A_Python_framework_for_Windows_Documentation#REPORTS_DIR | '''REPORTS_DIR''']] directory you specified in '''paths.py'''
* You can use a space-separated list of config files, to generate a report of startup and page load times.
=Directory Structure of Framework=
1
edit

Navigation menu