1
edit
Changes
→Introduction
[[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=
*Win32 system
=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]
* [http://www.cygwin.com/setup.exe Cygwin]
**For some reason, we can't get output from Firefox unless it's wrapped in a Cygwin sh shell. So we use cygwin for that, and to sync between Firefox runs.
* [http://www.dll-filesdriverskit.com/dllindexdll/downloadmsvcp71.php?msvcp71download0UIgUIXDmS dll/2371.html msvcp71.dll](NOTE: If you have Visual Studio 2003 installed, you've already got it.)
**Microsoft® C Runtime Library, v. 7.10.3077.0
**You need a copy of this file to run Python with all the libraries. **If you have Visual Studio 2003 installed, you've already got it.
=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 framework [http://www.yorku.ca/abel/liz/mozilla/Win32PerfTesting_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)
<pre>CYGWIN = r'c:\cygwin\bin\bash.exe -c'</pre>
*The path to cygwin bash to get output from dump() in Firefox
*By default, If you didn't specify a different root directory for the Cygwin you just to be installed , it is in your '''C:\'''
<pre>SYNC = r'c:\cygwin\bin\sync'</pre>
*Runs sync between Ts runs
*By default, If you didn't specify a different root directory for the Cygwin you just to be installed , it is in '''C:\'''
**Set to allow urls with scheme:file to open in new windows
**Set the preference to open new windows in a tab should be off.
===REPORTS_DIR===
*This is the path to the directory that the generated reports will go into
<pre>REPORTS_DIR = r'c:\C:\mozilla\testing\performance\win32\extension_perf_reports'</pre>*Create '''extension_perf_reports''' dir in '''C:\mozilla\testing\performance\win32\'''
OR
<pre>TS_URL = 'file:///c:/mozilla/testing/performance/win32/startup_test/startup_test.html?begin='</pre>
*Check that '''startup_test.html''' is in '''C:\mozilla\testing\performance\win32\startup_test'''
*'''Note: Don't change the local file url to a file path'''
*'''Note: Don't change the local file url to a file path'''
=Config file=
==Config fileinfo== (refer to Exended Progress Chart for yaml details - a few things have to be highlighted and clarified)
<pre>
# Filename will be appended to the timestamp in the report filename.
# 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
</pre>
*You can use a space-separated list of config files, to generate a report of startup and page load times. *The report will be placed NOTE: Content in the '''REPORTS_DIRbase_profile''' directory you specified in '''paths.py'''.dir may vary
The following is written by Annie Sullivan (annie.sullivan@gmail.com):
==base_profile/==
*This directory contains the base profile used for testing.
*A copy of this profile is made for each testing profile, and extensions or prefs are added according to the test_configs array in run_tests.py.
*For the page load test to run correctly, the hostperm.1 file must be set to allow scheme:file uris to open in new windows, and the pref to force a window to open in a tab must not be set.
*The dom.allow_scripts_to_close_windows pref should also be set to true. The browser.shell.checkDefaultBrowser pref should be set to false.
==page_load_test/==
*This directory contains the JavaScript files and html data files for the page load test. *The page load test opens a new window and cycles through loading each html file, timing each load.
==startup_test/==
*This directory contains the JavaScript to run the startup test. *It measures how long it takes Firefox to start up. ==extension_perf_report/==*This directory is where the generated report will go into. *You may specify another directory to substitute this directory, but make sure that the '''paths.py''' is changed to point to it.
==run_tests.py, paths.py==
*These files should be configured to run the test on different machines, with different extensions or preferences. See setup above.