Confirmed users
372
edits
Line 44: | Line 44: | ||
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: | 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:// | * 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 | * Add your tests to the folder, these will be accessed by a raw URL | ||
** the tests need to report [[ | ** 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 [[ | ** 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 [[ | ** 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 [[ | * 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 cycles, we recommend 20. | ||
** Add an item for url, this is relative to the talos directory and what Firefox will load | ** 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 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. ([[ | ** Add an item for filters. ([[https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/test.py#212 tresize example]]) | ||
== Pre/Post processing scripts == | == Pre/Post processing scripts == |