|
|
(15 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
| | {{delete|Content has been moved to more relevant pages|date=2019-08-13}} |
|
| |
|
| = Adding a new test = | | = Adding a new test = |
| | {{note|Moved to [[../Adding tests]]}} |
|
| |
|
| Adding a new performance test or modifying an existing test is much easier than most people think. I general we need to create a patch for talos which has:
| | = Hardware Profile of machines used in automation = |
| * determine if this is a [[Buildbot/Talos/Misc#Making_a_Startup_test_work|startup test]] or a [[Buildbot/Talos/Misc#Making_a_Pageloader_test_work|page load test]] and create the appropriate folder for your test in talos
| | {{note|Moved to [[../Platforms]]}} |
| * add all files and resources for the test (make sure there is no external network accesses) to that folder
| |
| * file a bug in the [https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=Talos testing:talos] component with your patch
| |
|
| |
|
| == What we need to know about tests == | | = Naming convention = |
| | | {{note|Moved to [[../Adding tests]]}} |
| When adding a new test, we really need to understand what we are doing. Here are some questions that you should know the answer to before adding a new test:
| |
| * What does this test measure?
| |
| * Does this test overlap with any existing test?
| |
| * What is the unit of measurement that we are recording?
| |
| * What would constitute a regression?
| |
| * What is the expected range in the results over time?
| |
| * Are there variables or conditions which would affect this test?
| |
| ** browser configuration (prefs, environment variables)?
| |
| ** OS, resources, time of day, etc... ?
| |
| * Indepenedent of Observation? Will this test produce the same number regardless of what was run before it?
| |
| * What considerations are there for how this test should be run and what tools are required?
| |
| | |
| Please document the answers to these questions on '''[[Buildbot/Talos/Tests]]'''.
| |
| | |
| == Making a Pageloader test work ==
| |
| | |
| A pageloader test is the most common. Using the pageloader extension allows for most of the reporting and talos integration to be done for you. Here is what you need to do:
| |
| * Create a new directory in the [https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/tests/ tests] subdirectory of talos
| |
| * Create a manifest
| |
| ** add a <testname>.manifest file in your directory ([https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/tests/svgx/svgx.manifest svg example])
| |
| *** raw page load will just be a single url line ([https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/tests/svgx/svgx.manifest#8 svg example])
| |
| *** internal measurements will have a % prior to the url ([https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/tests/svgx/svgx.manifest#11 svg example])
| |
| * Add your tests
| |
| ** for self reporting tests, use [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/pageloader/chrome/pageloader.js#553 tpRecordTime]]
| |
| *** [https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/tests/svgx/hixie-001.xml#286 tsvgx example] - single page/value
| |
| *** [https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/tests/tart/addon/content/tart.js#295 tart example] - multiple pages/values
| |
| * Add your test definition to talos via [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py test.py]] to add a new class for your test. ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py#657 tscrollx example]])
| |
| ** Add an item for tpmanifest, ${talos} is replaced with the current running directory.
| |
| *** example: tpmanifest = '${talos}/tests/scroll/scroll.manifest'
| |
| ** Add an item for tpcycles (we recommend 1) and tppagecycles (we recommend 25 for a simple page, and 5 for a internal recording benchmark)
| |
| ** Add an item for filters. ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py#560 tcanvasmark] example])
| |
| | |
| == Making a Startup test work ==
| |
| | |
| A startup test is designed to load the browser with a single page many times. This is useful for tests which shouldn't have any extensions, can handle all loading and measuring themselves, or require the measurement of the browser startup. Here is what you need to do:
| |
| * Create a new directory in the [https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/startup_test/ startup_test] subdirectory of talos
| |
| * Add your tests to the folder, these will be accessed by a raw URL
| |
| ** the tests need to report [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/results.py#284 __start_report<value>__end_report]] so talos will find it ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/startup_test/tpaint.html#69 tspaint example]])
| |
| ** if you plan on doing shutdown times, you need to add in [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/results.py#291 __startTimestamp<value>__endTimestamp]]. ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/startup_test/tpaint.html#71 tspaint example]])
| |
| ** Include [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/scripts/MozillaFileLogger.js MozillaFileLogger.js]] and [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/tests/quit.js quit.js]] in your script ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/startup_test/tpaint.html#3 tspaint example]])
| |
| * Add your test definition to talos via [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py test.py]] to add a new class for your test. ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py#201 tresize example]])
| |
| ** Add an item for cycles, we recommend 20.
| |
| ** Add an item for url, this is relative to the talos directory and what Firefox will load
| |
| ** Add tpmozafterpaint and set it to 'True' by default, or 'False' if your test does other internal measurements unrelated to rendering a page
| |
| ** Add an item for filters. ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py#212 tresize example]])
| |
| | |
| == Steps to add a test to production ==
| |
| * [[https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=Talos File a bug]] to add tests to [[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py talos]] [[https://bugzilla.mozilla.org/show_bug.cgi?id=893071 example]].
| |
| | |
| * add the test to the running [[http://hg.mozilla.org/build/buildbot-configs/file/tip/mozilla-tests/config.py#l176 buildbot configs]] (as seen on [[https://treeherder.mozilla.org/ Treeherder]])
| |
| ** for aurora/central on desktop only - just land your new test to your in-tree commit (on inbound) and ensure that you adjust talos.json to run the test.
| |
| ** NOTE: one exception is adding an entirely new suite- this requires a [[http://hg.mozilla.org/build/buildbot-configs/file/tip/mozilla-tests/config.py#l176 buildbot]] patch to add the new scheduled job. Example: [[https://bugzilla.mozilla.org/show_bug.cgi?id=886288 Bug 886288 - deploy new tsvgx and tscrollx talos tests to m-c only]]
| |
| | |
| * Update talos
| |
| ** just land code in-tree (inbound/fx-team)
| |
| | |
| * Ensure the test follows the branch through the [[http://mozilla.github.io/process-releases/draft/development_overview/ release stages]]
| |
| ** if we are dealing with buildbot configs, then we will need bugs for each merge cycle to turn on/off appropriate tests
| |
| ** if we are just updating talos.json, this will be automatic
| |
| | |
| * if this is an update to an existing test that could change the numbers, this needs to be treated as a new test and run side by side for a week to get a new baseline for the numbers.
| |
| | |
| * [https://bugzilla.mozilla.org/enter_bug.cgi?product=Tree%20Management&component=Treeherder%3A%20Data%20Ingestion File a bug] to get Treeherder updated with a new letter to track this test.
| |
| | |
| * document the test on [[Buildbot/Talos]] and [[Buildbot/Talos/Tests]]
| |
| ** NOTE: this should be updated every time the branch moves closer to release. Once on release we don't need to update
| |
| | |
| While that is a laundry list of items to do, if you are developer of a component just talk to the a*team ([[https://mozillians.org/en-US/u/jmaher/ jmaher]]) and they will handle the majority of the steps above.
| |
| | |
| = Background Information =
| |
| | |
| == Hardware Profile of machines used in automation ==
| |
| | |
| * linux32, linux64, winXP, win7, win8x64:
| |
| iX21X4 2U Neutron "Gemini" Series Four Node Hot-Pluggable Server (4 nodes per 2U)
| |
| 920W High-Efficiency redundant (1+1) Power Supply
| |
| 1 Intel X3450 CPU per node
| |
| 8GB Total: 2 x 4GB DDR3 1333Mhz ECC/REG RAM per node
| |
| 1 WD5003ABYX hard drive per node
| |
| 1 NVIDIA GPU GeForce GT 610 per node
| |
| | |
| * OSX 10.8 (mtnlion):
| |
| Model Name: Mac mini
| |
| Model Identifier: Macmini5,3
| |
| Processor Name: Intel Core i7
| |
| Processor Speed: 2 GHz
| |
| Number of Processors: 1
| |
| Total Number of Cores: 4
| |
| L2 Cache (per Core): 256 KB
| |
| L3 Cache: 6 MB
| |
| Memory: 8 GB
| |
| Disk: 2 x 500G SATA drives (RAID)
| |
| | |
| ** All Mac Minis have EDID devices attached that set the resolution at 1600x1200.
| |
| | |
| == Naming convention ==
| |
| 't' is pre-pended to the names to represent 'test'. Thus, ts = 'test startup', tp = 'test pageload', tdhtml = 'test dhtml'.
| |
| | |
| == History of tp Tests ==
| |
| | |
| === tp ===
| |
| | |
| The original tp test created by Mozilla to test browser page load time. Cycled through 40 pages. The pages were copied from the live web during November, 2000. Pages were cycled by loading them within the main browser window from a script that lived in content.
| |
| | |
| === tp2/tp_js ===
| |
| | |
| The same tp test but loading the individual pages into a frame instead of the main browser window. Still used the old 40 page, year 2000 web page test set.
| |
| | |
| === tp3 ===
| |
| | |
| An update to both the page set and the method by which pages are cycled. The page set is now 393 pages from December, 2006. The pageloader is re-built as an extension that is pre-loaded into the browser chrome/components directories.
| |
| | |
| === tp4 ===
| |
| | |
| Updated web page test set to 100 pages from February 2009.
| |
| | |
| === tp4m ===
| |
| This is a smaller pageset (21 pages) designed for mobile Firefox. This is a blend of regular and mobile friendly pages.
| |
| | |
| We landed on this on April 18th, 2011 in {{bug|648307}}. This runs for Android and Maemo mobile builds only.
| |
| | |
| === tp5 ===
| |
| | |
| Updated web page test set to 100 pages from April 8th, 2011. Effort was made for the pages to no longer be splash screens/login pages/home pages but to be pages that better reflect the actual content of the site in question.
| |
| * [https://wiki.mozilla.org/Buildbot/Talos/Misc duplicated & updated from old page]
| |