CINXE.COM

Automated Testing — Firefox Source Docs documentation

<!doctype html> <html class="writer-html5" lang="en" data-content_root="../../"> <head> <base href="https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Automated Testing — Firefox Source Docs documentation</title> <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50"> <link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094"> <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=fd3f3429"> <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b"> <link rel="stylesheet" type="text/css" href="../../_static/custom_theme.css?v=dc5ed815"> <link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7"> <link rel="shortcut icon" href="../../_static/firefox.ico"><!--[if lt IE 9]> <script src="../../_static/js/html5shiv.min.js"></script> <![endif]--> <script src="../../_static/jquery.js?v=5d32c60e"></script> <script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> <script src="../../_static/documentation_options.js?v=5929fcd5"></script> <script src="../../_static/doctools.js?v=9a2dae69"></script> <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> <script src="../../_static/clipboard.min.js?v=a7894cd8"></script> <script src="../../_static/copybutton.js?v=30646c52"></script> <script src="../../_static/design-tabs.js?v=36754332"></script> <script src="../../_static/js/theme.js"></script> <link rel="index" title="Index" href="../../genindex.html"> <link rel="search" title="Search" href="../../search.html"> <link rel="next" title="Adding Context to manifestparser based Manifests" href="manifest-sandbox.html"> <link rel="prev" title="Vendoring Third Party Components" href="../../mozbuild/vendor/index.html"> <meta http-equiv="X-Translated-By" content="Google"> <meta http-equiv="X-Translated-To" content="iw"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.tKc6KWkFf-8.O/am=gAE/d=1/rs=AN8SPfrf36LIV3DkhtRBGWFnLWWzaykPyw/m=corsproxy" data-sourceurl="https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html"></script> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.tKc6KWkFf-8.O/am=gAE/d=1/exm=corsproxy/ed=1/rs=AN8SPfrf36LIV3DkhtRBGWFnLWWzaykPyw/m=phishing_protection" data-phishing-protection-enabled="false" data-forms-warning-enabled="true" data-source-url="https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html"></script> <meta name="robots" content="none"> </head> <body class="wy-body-for-nav"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.tKc6KWkFf-8.O/am=gAE/d=1/exm=corsproxy,phishing_protection/ed=1/rs=AN8SPfrf36LIV3DkhtRBGWFnLWWzaykPyw/m=navigationui" data-environment="prod" data-proxy-url="https://firefox--source--docs-mozilla-org.translate.goog" data-proxy-full-url="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" data-source-url="https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html" data-source-language="pl" data-target-language="iw" data-display-language="en-GB" data-detected-source-language="" data-is-source-untranslated="false" data-source-untranslated-url="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://firefox-source-docs.mozilla.org/testing/automated-testing/index.html&amp;anno=2" data-client="tr"></script> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search"><a href="https://firefox--source--docs-mozilla-org.translate.goog/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="icon icon-home"> Firefox Source Docs <img src="../../_static/firefox-wordmark.svg" class="logo" alt="Logo"> </a><!-- -- This code is governed by the BSD license ----> <div> <h3>Quick search</h3> <script> (function () { var cx = "dd12886298f75dbef"; var gcse = document.createElement("script"); gcse.async = true; gcse.src = "https://cse.google.com/cse.js?cx=" + cx; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(gcse, s); })(); </script><gcse:search></gcse:search> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption" role="heading"><span class="caption-text">Overview</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/glossary/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">A Glossary of Common Terms</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/overview/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">A Quick Guide to Mozilla Applications</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Getting Started</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/setup/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Getting Set Up To Work On The Firefox Codebase</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Working On Firefox</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/contributing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Working on Firefox</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/bug-mgmt/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Bug Handling</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Firefox User Guide</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/devtools-user/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox DevTools User Docs</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Source Code Documentation</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mots/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Governance</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/browser/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox Front-end</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/dom/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">DOM</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/editor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Editor</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/layout/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Style system (CSS) &amp; Layout</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/gfx/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Graphics</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/ipc/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Processes, Threads and IPC</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/devtools/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox DevTools Contributor Docs</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/toolkit/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Toolkit</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/js/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">SpiderMonkey</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/jsloader/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">JS Loader</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mobile/android/geckoview/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">GeckoView</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mobile/android/fenix/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Fenix</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mobile/android/focus-android/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Focus for Android</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/dom/bindings/webidl/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">WebIDL</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/modules/libpref/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">libpref</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/networking/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Networking</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/remote/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Remote Protocols</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/services/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Services</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/permissions/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Permissions</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/uriloader/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">File Handling</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/widget/cocoa/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox on macOS</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/widget/windows/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox on Windows</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/toolkit/components/ml/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox AI Runtime</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/accessible/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Accessibility</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/media/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Media Playback</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Code quality</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/writing-rust-code/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Writing Rust Code</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/rust-components/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Rust Components</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/profiler/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Gecko Profiler</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/performance/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Performance</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/storage/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Database bindings (SQLite, KV, …)</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/xpcom/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">XPCOM</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/nspr/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">NSPR</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/security/nss/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Network Security Services (NSS)</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/content-security/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Web Security Checks in Gecko</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">The Firefox Build System</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mach/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mach</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/try/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Pushing to Try</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/build/buildsystem/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Build System</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/taskcluster/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox CI and Taskgraph</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/moztreedocs/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Managing Documentation</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Vendoring Third Party Components</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Testing &amp; Test Infrastructure</span></p> <ul class="current"> <li class="toctree-l1 current"><a class="current reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#">Automated Testing</a> <ul> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#firefox-production">Firefox Production</a> <ul> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#linting">Linting</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#functional-testing">Functional testing</a> <ul> <li class="toctree-l4"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#table-key">Table key</a></li> </ul></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#performance-testing">Performance testing</a></li> </ul></li> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#so-which-should-i-use">So which should I use?</a> <ul> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#is-it-low-level-code">Is it low-level code?</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#does-it-cause-a-crash">Does it cause a crash?</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#is-it-a-layout-graphics-feature">Is it a layout/graphics feature?</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#do-you-need-to-verify-performance">Do you need to verify performance?</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#are-you-testing-ui-features">Are you testing UI features?</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#are-you-testing-mobile-android">Are you testing Mobile/Android?</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#are-you-doing-none-of-the-above">Are you doing none of the above?</a></li> </ul></li> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#need-to-get-more-data-out-of-your-tests">Need to get more data out of your tests?</a></li> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#need-to-set-preferences-for-test-suites">Need to set preferences for test-suites?</a> <ul> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#setting-prefs-that-only-apply-to-certain-tests">Setting prefs that only apply to certain tests</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#setting-prefs-that-apply-to-the-entire-suite">Setting prefs that apply to the entire suite</a></li> </ul></li> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#adding-new-context-to-skip-conditions">Adding New Context to Skip Conditions</a> <ul> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/manifest-sandbox.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Adding Context to <code class="docutils literal notranslate"><span class="pre">manifestparser</span></code> based Manifests</a></li> <li class="toctree-l3"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/manifest-sandbox.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#adding-a-context-to-reftest-style-manifests">Adding a Context to Reftest Style Manifests</a></li> </ul></li> </ul></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/treeherder-try/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Understanding Treeherder Results</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/sheriffed-intermittents/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Sheriffed intermittent failures</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/tests-for-new-config/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Turning on Firefox tests for a new configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/intermittent/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Avoiding intermittent tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/testing-policy/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Testing Policy</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/ci-configs/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Configuration Changes</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/browser-chrome/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Browser chrome mochitests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/chrome-tests/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Chrome Tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/marionette/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Marionette</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/geckodriver/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">geckodriver</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/test-verification/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Test Verification</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/webrender/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">WebRender Tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/xpcshell/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">XPCShell tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/tps/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">TPS</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">web-platform-tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/gtest/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">GTest</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/fuzzing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Fuzzing</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/sanitizer/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Sanitizer</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/perfdocs/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Performance Testing</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/code-coverage/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Code coverage</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing-rust-code/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Testing &amp; Debugging Rust Code</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Releases &amp; Updates</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/update-infrastructure/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mozilla Update Infrastructure</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/update-infrastructure/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#watershed-updates">Watershed Updates</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/update-infrastructure/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#desupport-updates">Desupport Updates</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/update-verify/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Update Verify</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Localization &amp; Internationalization</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/intl/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Internationalization</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/l10n/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Localization</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Firefox and Python</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbase/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">mozbase</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/python/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Using third-party Python packages</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Metrics Collected in Firefox</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/metrics/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Metrics</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="Mobile navigation menu"><i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="https://firefox--source--docs-mozilla-org.translate.goog/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox Source Docs</a> </nav> <div class="wy-nav-content"> <div class="rst-content"><!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this file, - You can obtain one at http://mozilla.org/MPL/2.0/. --> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="https://firefox--source--docs-mozilla-org.translate.goog/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="icon icon-home" aria-label="Home"></a></li> <li class="breadcrumb-item active">Automated Testing</li> <li class="wy-breadcrumbs-aside"><a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://bugzilla.mozilla.org/enter_bug.cgi?product%3DDeveloper%2BInfrastructure%26component%3DFirefox%2BSource%2BDocs%253A%2BContent%26short_desc%3DDocumentation%2Bissue%2Bon%2Btesting/automated-testing/index%26comment%3DURL%2B%3D%2Bhttps://firefox-source-docs.mozilla.org/testing/automated-testing/index.html%26bug_file_loc%3Dhttps://firefox-source-docs.mozilla.org/testing/automated-testing/index.html" rel="nofollow">Report an issue</a> / <a href="https://firefox--source--docs-mozilla-org.translate.goog/_sources/testing/automated-testing/index.rst.txt?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" rel="nofollow"> View page source</a></li> </ul> <hr> </div> <div role="main" class="document" itemscope itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <section id="automated-testing"> <h1>Automated Testing<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#automated-testing" title="Link to this heading"></a></h1> <p>You’ve just written a feature and (hopefully!) want to test it. Or you’ve decided that an existing feature doesn’t have enough tests and want to contribute some. But where do you start? You’ve looked around and found references to things like “xpcshell” or “web-platform-tests” or “talos”. What code, features or platforms do they all test? Where do their feature sets overlap? In short, where should your new tests go? This document is a starting point for those who want to start to learn about Mozilla’s automated testing tools and procedures. Below you’ll find a short summary of each framework we use, and some questions to help you pick the framework(s) you need for your purposes.</p> <p>If you still have questions, ask on <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://wiki.mozilla.org/Matrix">Matrix</a> or on the relevant bug.</p> <section id="firefox-production"> <h2>Firefox Production<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#firefox-production" title="Link to this heading"></a></h2> <p>These tests are found within the <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://hg.mozilla.org/mozilla-central">mozilla-central</a> tree, along with the product code.</p> <p>They are run when a changeset is pushed to <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://hg.mozilla.org/mozilla-central">mozilla-central</a>, <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://hg.mozilla.org/integration/autoland/">autoland</a>, or <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/try/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">try</a>, with the results showing up on <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://treeherder.mozilla.org/">Treeherder</a>. Not all tests will be run on every changeset; alogrithms are put in place to run the most likely failures, with all tests being run on a regular basis.</p> <p>They can also be run on local builds. Note: Most of the mobile tests run on emulators, but some of the tests (notably, performance tests) run on hardware devices. We try to avoid running mobile tests on hardware devices unnecessarily. In Treeherder, tests with names that start with “hw-” run on hardware.</p> <section id="linting"> <h3>Linting<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#linting" title="Link to this heading"></a></h3> <p>Lint tests help to ensure better quality, less error-prone code by analysing the code with a linter.</p> <table class="docutils align-default" id="id14"> <caption> <span class="caption-text">Linters</span><a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#id14" title="Link to this table"></a> </caption> <thead> <tr class="row-odd"> <th class="head"><p>Treeherder Symbol</p></th> <th class="head"><p>Name</p></th> <th class="head"><p>Platforms</p></th> <th class="head"><p>What is Tested</p></th> </tr> </thead> <tbody> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">ES</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/lint/linters/eslint.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">ESLint</a></p></td> <td><p>All</p></td> <td><p>JavaScript is analyzed for correctness.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">ES-build</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/lint/linters/eslint.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#eslint-build-es-b">eslint-build</a></p></td> <td><p>All</p></td> <td><p>Extended javascript analysis that uses build artifacts.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">mocha(EPM)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/lint/linters/eslint-plugin-mozilla.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">ESLint-plugin-mozilla</a></p></td> <td><p>Desktop</p></td> <td><p>The ESLint plugin rules.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">f8</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/lint/linters/flake8.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">flake8</a></p></td> <td><p>All</p></td> <td><p>Python analyzed for style and correctness.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">stylelint</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/lint/linters/stylelint.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Stylelint</a></p></td> <td><p>All</p></td> <td><p>CSS is analyzed for correctness.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">W</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">wpt lint</a></p></td> <td><p>Desktop</p></td> <td><p>web-platform-tests analyzed for style and manifest correctness</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">WR(tidy)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/webrender/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">WebRender servo-tidy</a></p></td> <td><p>Desktop</p></td> <td><p>Code in gfx/wr is run through servo-tidy.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">A</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/lint/linters/android-format.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Spotless</a></p></td> <td><p>Android</p></td> <td><p>Java is analyzed for style and correctness.</p></td> </tr> </tbody> </table> </section> <section id="functional-testing"><span id="id1"></span> <h3>Functional testing<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#functional-testing" title="Link to this heading"></a></h3> <table class="docutils align-default" id="id15"> <caption> <span class="caption-text">Automated Test Suites</span><a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#id15" title="Link to this table"></a> </caption> <thead> <tr class="row-odd"> <th class="head"><p>Treeherder Symbol</p></th> <th class="head"><p>Name</p></th> <th class="head"><p>Platform</p></th> <th class="head"><p>Process</p></th> <th class="head"><p>Environment</p></th> <th class="head"></th> <th class="head"><p>Privilege</p></th> <th class="head"><p>What is Tested</p></th> </tr> <tr class="row-even"> <th class="head"></th> <th class="head"></th> <th class="head"></th> <th class="head"></th> <th class="head"><p>Shell</p></th> <th class="head"><p>Browser Profile</p></th> <th class="head"></th> <th class="head"></th> </tr> </thead> <tbody> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">R(J)</span></code></p></td> <td><p>JS Reftest</p></td> <td><p>Desktop</p></td> <td><p>N/A</p></td> <td><p>JSShell</p></td> <td><p>N/A</p></td> <td><p>N/A</p></td> <td><p>The JavaScript engine’s implementation of the JavaScript language.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">R(C)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Crashtest</a></p></td> <td><p>All</p></td> <td><p>Child</p></td> <td><p>Content</p></td> <td><p>Yes</p></td> <td><p>Low</p></td> <td><p>That pages load without crashing, asserting, or leaking.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">R(R)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Reftest</a></p></td> <td><p>All</p></td> <td><p>Child</p></td> <td><p>Content</p></td> <td><p>Yes</p></td> <td><p>Low</p></td> <td><p>That pages are rendered (and thus also layed out) correctly.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">GTest</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/gtest/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">GTest</a></p></td> <td><p>All</p></td> <td><p>N/A</p></td> <td><p>Terminal</p></td> <td><p>N/A</p></td> <td><p>N/A</p></td> <td><p>Code that is not exposed to JavaScript.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">X</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/xpcshell/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">xpcshell</a></p></td> <td><p>All</p></td> <td><p>Parent, Allow</p></td> <td><p>XPCShell</p></td> <td><p>Allow</p></td> <td><p>High</p></td> <td><p>Low-level code exposed to JavaScript, such as XPCOM components.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">M(a11y)</span></code></p></td> <td><p>Accessibility (mochitest-a11y)</p></td> <td><p>Desktop</p></td> <td><p>Child</p></td> <td><p>Content</p></td> <td><p>Yes</p></td> <td><p>?</p></td> <td><p>Accessibility interfaces.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">M(1),</span> <span class="pre">M(2),</span> <span class="pre">M(...)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest plain</a></p></td> <td><p>All</p></td> <td><p>Child</p></td> <td><p>Content</p></td> <td><p>Yes</p></td> <td><p>Low, Allow</p></td> <td><p>Features exposed to JavaScript in web content, like DOM and other Web APIs, where the APIs do not require elevated permissions to test.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">M(c1/c2/c3)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/chrome-tests/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest chrome</a></p></td> <td><p>All</p></td> <td><p>Child, Allow</p></td> <td><p>Content</p></td> <td><p>Yes</p></td> <td><p>High</p></td> <td><p>Code requiring UI or JavaScript interactions with privileged objects.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">M(bc)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest browser-chrome</a></p></td> <td><p>All</p></td> <td><p>Parent, Allow</p></td> <td><p>Browser</p></td> <td><p>Yes</p></td> <td><p>High</p></td> <td><p>How the browser UI interacts with itself and with content.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">M(remote)</span></code></p></td> <td><p>Mochitest Remote Protocol</p></td> <td><p>All</p></td> <td><p>Parent, Allow</p></td> <td><p>Browser</p></td> <td><p>Yes</p></td> <td><p>High</p></td> <td><p>Firefox Remote Protocol (Implements parts of Chrome dev-tools protocol). Based on Mochitest browser-chrome.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">SM(...),</span> <span class="pre">SM(pkg)</span></code></p></td> <td><p><a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://wiki.mozilla.org/Javascript:Automation_Builds">SpiderMonkey automation</a></p></td> <td><p>Desktop</p></td> <td><p>N/A</p></td> <td><p>JSShell</p></td> <td><p>N/A</p></td> <td><p>Low</p></td> <td><p>SpiderMonkey engine shell tests and JSAPI tests.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">W</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">web-platform-tests</a></p></td> <td><p>Desktop</p></td> <td><p>Child</p></td> <td><p>Content</p></td> <td><p>Yes</p></td> <td><p>Low</p></td> <td><p>Standardized features exposed to ECMAScript in web content; tests are shared with other vendors.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">Wr</span></code></p></td> <td><p><a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://web-platform-tests.org/writing-tests/reftests.html">web-platform-tests</a></p></td> <td><p>All</p></td> <td><p>Child</p></td> <td><p>Content</p></td> <td><p>Yes</p></td> <td><p>Low</p></td> <td><p>Layout and graphic correctness for standardized features; tests are shared with other vendors.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">Mn</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/marionette/Testing.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Marionette</a></p></td> <td><p>Desktop</p></td> <td><p>?</p></td> <td><p>Content, Browser</p></td> <td><p>?</p></td> <td><p>High</p></td> <td><p>Large out-of-process function integration tests and tests that do communication with multiple remote Gecko processes.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">Fxfn</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/remote/Testing.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#puppeteer-tests">Firefox UI Tests</a></p></td> <td><p>Desktop</p></td> <td><p>?</p></td> <td><p>Content, Browser</p></td> <td><p>Yes</p></td> <td><p>High</p></td> <td><p>Integration tests with a focus on the user interface and localization.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">tt(c)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/toolkit/components/telemetry/internals/tests.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">telemetry-tests-client</a></p></td> <td><p>Desktop</p></td> <td><p>N/A</p></td> <td><p>Content, Browser</p></td> <td><p>Yes</p></td> <td><p>High</p></td> <td><p>Integration tests for the Firefox Telemetry client.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">TV</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/test-verification/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Test Verification (test-verify)</a></p></td> <td><p>All</p></td> <td><p>Depends on test harness</p></td> <td><p>?</p></td> <td><p>?</p></td> <td><p>?</p></td> <td><p>Uses other test harnesses - mochitest, reftest, xpcshell - to perform extra testing on new/modified tests.</p></td> </tr> <tr class="row-even"> <td><p><code class="docutils literal notranslate"><span class="pre">TVw</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/test-verification/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Test Verification for wpt (test-verify-wpt)</a></p></td> <td><p>Desktop</p></td> <td><p>Child</p></td> <td><p>?</p></td> <td><p>?</p></td> <td><p>?</p></td> <td><p>Uses wpt test harnesses to perform extra testing on new/modified web-platform tests.</p></td> </tr> <tr class="row-odd"> <td><p><code class="docutils literal notranslate"><span class="pre">WR(wrench)</span></code></p></td> <td><p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/webrender/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">WebRender standalone tests</a></p></td> <td><p>All</p></td> <td><p>N/A</p></td> <td><p>Terminal</p></td> <td><p>N/A</p></td> <td><p>N/A</p></td> <td><p>WebRender rust code (as a standalone module, with Gecko integration).</p></td> </tr> </tbody> </table> <p>Note: there are preference-based variations of the previous testing suites. For example, mochitests on Treeherder can have <code class="docutils literal notranslate"><span class="pre">gli</span></code>, <code class="docutils literal notranslate"><span class="pre">swr</span></code>, <code class="docutils literal notranslate"><span class="pre">spi</span></code>, <code class="docutils literal notranslate"><span class="pre">nofis</span></code>, <code class="docutils literal notranslate"><span class="pre">a11y-checks</span></code>, <code class="docutils literal notranslate"><span class="pre">spi-nw-1proc</span></code>, and many others. Another example is GTest, which can use <code class="docutils literal notranslate"><span class="pre">GTest-1proc</span></code>. To learn more about these variations, you can mouse hover over these items to read a description of what these abbreviations mean.</p> <section id="table-key"><span id="id2"></span> <h4>Table key<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#table-key" title="Link to this heading"></a></h4> <dl class="simple"> <dt> Symbol </dt> <dd> <p>Abbreviation for the test suite used by <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://treeherder.mozilla.org/">Treeherder</a>. The first letter generally indicates which of the test harnesses is used to execute the test. The letter in parentheses identifies the actual test suite.</p> </dd> <dt> Name </dt> <dd> <p>Common name used when referring to the test suite.</p> </dd> <dt> Platform </dt> <dd> <p>Most test suites are supported only on a subset of the available plaforms and operating systems. Unless otherwise noted:</p> <ul class="simple"> <li><p><strong>Desktop</strong> tests run on Windows, Mac OS X, and Linux.</p></li> <li><p><strong>Mobile</strong> tests run on Android emulators or remotely on Android devices.</p></li> </ul> </dd> <dt> Process </dt> <dd> <ul class="simple"> <li><p>When <strong>Parent</strong> is indicated, the test file will always run in the parent process, even when the browser is running in Electrolysis (e10s) mode.</p></li> <li><p>When <strong>Child</strong> is indicated, the test file will run in the child process when the browser is running in Electrolysis (e10s) mode.</p></li> <li><p>The <strong>Allow</strong> label indicates that the test has access to mechanisms to run code in the other process.</p></li> </ul> </dd> <dt> Environment </dt> <dd> <ul class="simple"> <li><p>The <strong>JSShell</strong> and <strong>XPCShell</strong> environments are limited JavaScript execution environments with no windows or user interface (note however that XPCShell tests on Android are run within a browser window.)</p></li> <li><p>The <strong>Content</strong> indication means that the test is run inside a content page loaded by a browser window.</p></li> <li><p>The <strong>Browser</strong> indication means that the test is loaded in the JavaScript context of a browser XUL window.</p></li> <li><p>The <strong>Browser Profile</strong> column indicates whether a browser profile is loaded when the test starts. The <strong>Allow</strong> label means that the test can optionally load a profile using a special command.</p></li> </ul> </dd> <dt> Privilege </dt> <dd> <p>Indicates whether the tests normally run with low (content) or high (chrome) JavaScript privileges. The <strong>Allow</strong> label means that the test can optionally run code in a privileged environment using a special command.</p> </dd> </dl> </section> </section> <section id="performance-testing"><span id="id3"></span> <h3>Performance testing<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#performance-testing" title="Link to this heading"></a></h3> <p>There are many test harnesses used to test performance. <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/perfdocs?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">For more information on the various performance harnesses, check out the perf docs.</a></p> </section> </section> <section id="so-which-should-i-use"><span id="id4"></span> <h2>So which should I use?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#so-which-should-i-use" title="Link to this heading"></a></h2> <p>Generally, you should pick the lowest-level framework that you can. If you are testing JavaScript but don’t need a window, use XPCShell or even JSShell. If you’re testing page layout, try to use <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://web-platform-tests.org/writing-tests/reftests.html">web-platform-test reftest.</a> The advantage in lower level testing is that you don’t drag in a lot of other components that might have their own problems, so you can home in quickly on any bugs in what you are specifically testing.</p> <p>Here’s a series of questions to ask about your work when you want to write some tests.</p> <section id="is-it-low-level-code"><span id="id5"></span> <h3>Is it low-level code?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#is-it-low-level-code" title="Link to this heading"></a></h3> <p>If the functionality is exposed to JavaScript, and you don’t need a window, consider <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/xpcshell/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">XPCShell</a>. If not, you’ll probably have to use <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/gtest/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">GTest</a>, which can test pretty much anything. In general, this should be your last option for a new test, unless you have to test something that is not exposed to JavaScript.</p> </section> <section id="does-it-cause-a-crash"><span id="id6"></span> <h3>Does it cause a crash?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#does-it-cause-a-crash" title="Link to this heading"></a></h3> <p>If you’ve found pages that crash Firefox, add a <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">crashtest</a> to make sure future versions don’t experience this crash (assertion or leak) again. Note that this may lead to more tests once the core problem is found.</p> </section> <section id="is-it-a-layout-graphics-feature"><span id="is-it-a-layoutgraphics-feature"></span> <h3>Is it a layout/graphics feature?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#is-it-a-layout-graphics-feature" title="Link to this heading"></a></h3> <p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/layout/Reftest.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#writing-tests">Reftest</a> is your best bet, if possible.</p> </section> <section id="do-you-need-to-verify-performance"><span id="id7"></span> <h3>Do you need to verify performance?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#do-you-need-to-verify-performance" title="Link to this heading"></a></h3> <p><a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/perfdocs?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Use an appropriate performance test suite from this list</a>.</p> </section> <section id="are-you-testing-ui-features"><span id="id8"></span> <h3>Are you testing UI features?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#are-you-testing-ui-features" title="Link to this heading"></a></h3> <p>Try one of the flavors of <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">mochitest</a>, or <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/docs/Marionette?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Marionette</a> if the application also needs to be restarted, or tested with localized builds.</p> </section> <section id="are-you-testing-mobile-android"><span id="are-you-testing-mobileandroid"></span> <h3>Are you testing Mobile/Android?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#are-you-testing-mobile-android" title="Link to this heading"></a></h3> <p>If you are testing GeckoView, you will need to need to use <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/mobile/android/geckoview/contributor/junit.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#testing-overview">JUnit integration tests</a>.</p> <p>There are some specific features that <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest</a> or <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/layout/Reftest.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Reftest</a> can cover. Browser-chrome tests do not run on Android. If you want to test performance, <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/perfdocs/raptor.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Raptor</a> will be a good choice.</p> </section> <section id="are-you-doing-none-of-the-above"><span id="id9"></span> <h3>Are you doing none of the above?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#are-you-doing-none-of-the-above" title="Link to this heading"></a></h3> <ul class="simple"> <li><p>To get your tests running in continuous integration, try <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">web-platform-tests</a>, or <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest</a>, or, if higher privileges are required, try <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest browser chrome tests</a>.</p></li> <li><p>For Desktop Firefox, or if you just want to see the future of Gecko testing, look into the on-going <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/marionette/Testing.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#harness-tests">Marionette</a> project.</p></li> </ul> </section> </section> <section id="need-to-get-more-data-out-of-your-tests"><span id="id10"></span> <h2>Need to get more data out of your tests?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#need-to-get-more-data-out-of-your-tests" title="Link to this heading"></a></h2> <p>Most test jobs now expose an environment variable named <code class="docutils literal notranslate"><span class="pre">MOZ_UPLOAD_DIR</span></code>. If this variable is set during automated test runs, you can drop additional files into this directory, and they will be uploaded to a web server when the test finishes. The URLs to retrieve the files will be output in the test log.</p> <p>Passing <code class="docutils literal notranslate"><span class="pre">MOZ_RECORD_TEST=1</span></code> as an environment variable when running some tests (e.g. mochitests) on Linux Desktop and macOS will trigger a recording of the desktop with GNOME Screencast. This works on try as well, in which case the video file will be uploaded as an artifact and available in the <code class="docutils literal notranslate"><span class="pre">Artifacts</span> <span class="pre">and</span> <span class="pre">Debugging</span> <span class="pre">Tools</span></code> panel on Treeherder.</p> </section> <section id="need-to-set-preferences-for-test-suites"><span id="id11"></span> <h2>Need to set preferences for test-suites?<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#need-to-set-preferences-for-test-suites" title="Link to this heading"></a></h2> <p>First ask yourself if these prefs need to be enabled for all tests or just a subset of tests (e.g to enable a feature).</p> <section id="setting-prefs-that-only-apply-to-certain-tests"><span id="id12"></span> <h3>Setting prefs that only apply to certain tests<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#setting-prefs-that-only-apply-to-certain-tests" title="Link to this heading"></a></h3> <p>If the answer is the latter, try to set the pref as local to the tests that need it as possible. Here are some options:</p> <ul> <li><p>If the test runs in chrome scope (e.g mochitest chrome or browser-chrome), you can use <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://searchfox.org/mozilla-central/source/modules/libpref/nsIPrefBranch.idl">Services.prefs</a> to set the prefs in your test’s setup function. Be sure to reset the pref back to its original value during teardown!</p></li> <li><p>Mochitest plain tests can use <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/faq.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#what-if-i-need-to-change-a-preference-to-run-my-test">SpecialPowers</a> to set prefs.</p></li> <li><p>All variants of mochitest can set prefs in their manifests. For example, to set a pref for all tests in a manifest:</p> <div class="highlight-default notranslate"> <div class="highlight"> <pre><span></span><span class="p">[</span><span class="n">DEFAULT</span><span class="p">]</span> <span class="n">prefs</span> <span class="o">=</span> <span class="n">my</span><span class="o">.</span><span class="n">awesome</span><span class="o">.</span><span class="n">pref</span><span class="o">=</span><span class="n">foo</span><span class="p">,</span> <span class="n">my</span><span class="o">.</span><span class="n">other</span><span class="o">.</span><span class="n">awesome</span><span class="o">.</span><span class="n">pref</span><span class="o">=</span><span class="n">bar</span><span class="p">,</span> <span class="p">[</span><span class="n">test_foo</span><span class="o">.</span><span class="n">js</span><span class="p">]</span> <span class="p">[</span><span class="n">test_bar</span><span class="o">.</span><span class="n">js</span><span class="p">]</span> </pre> </div> </div></li> <li><p>All variants of reftest can also set prefs in their <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/layout/Reftest.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">manifests</a>.</p></li> <li><p>All variants of web-platform-tests can also <a class="reference external" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#enabling-prefs">set prefs in their manifests</a>.</p></li> </ul> </section> <section id="setting-prefs-that-apply-to-the-entire-suite"><span id="id13"></span> <h3>Setting prefs that apply to the entire suite<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#setting-prefs-that-apply-to-the-entire-suite" title="Link to this heading"></a></h3> <p>Most test suites define prefs in user.js files that live under <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://searchfox.org/mozilla-central/source/testing/profiles">testing/profiles</a>. Each directory is a profile that contains a <code class="docutils literal notranslate"><span class="pre">user.js</span></code> file with a number of prefs defined in it. Test suites will then merge one or more of these basic profiles into their own profile at runtime. To see which profiles apply to which test suites, you can inspect <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://searchfox.org/mozilla-central/source/testing/profiles/profiles.json">testing/profiles/profiles.json</a>. Profiles at the beginning of the list get overridden by profiles at the end of the list.</p> <p>Because this system makes it hard to get an overall view of which profiles are set for any given test suite, a handy <code class="docutils literal notranslate"><span class="pre">profile</span></code> utility was created:</p> <div class="highlight-default notranslate"> <div class="highlight"> <pre><span></span>$ cd testing/profiles $ ./profile -- --help usage: profile [-h] {diff,sort,show,rm} ... $ ./profile show mochitest # prints all prefs that will be set in mochitest $ ./profile diff mochitest reftest # prints differences between the mochitest and reftest suites </pre> </div> </div> <div class="blockindicator note docutils container"> <p><strong>Note:</strong> JS engine tests do not use testing/profiles yet, instead <a class="reference external" href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://searchfox.org/mozilla-central/source/js/src/tests/user.js">set prefs here</a>.</p> </div> </section> </section> <section id="adding-new-context-to-skip-conditions"> <h2>Adding New Context to Skip Conditions<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#adding-new-context-to-skip-conditions" title="Link to this heading"></a></h2> <p>Often when standing up new test configurations, it’s necessary to add new keys that can be used in <code class="docutils literal notranslate"><span class="pre">skip-if</span></code> annotations.</p> <div class="toctree-wrapper compound"> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/manifest-sandbox.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Adding Context to <code class="docutils literal notranslate"><span class="pre">manifestparser</span></code> based Manifests</a> <ul> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/manifest-sandbox.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#how-to-add-a-keyword">How to Add a Keyword</a></li> </ul></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/manifest-sandbox.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#adding-a-context-to-reftest-style-manifests">Adding a Context to Reftest Style Manifests</a> <ul> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/manifest-sandbox.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#id1">How to Add a Keyword</a></li> </ul></li> </ul> </div> </section> </section> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="Footer"><a href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="btn btn-neutral float-left" title="Vendoring Third Party Components" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/manifest-sandbox.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="btn btn-neutral float-right" title="Adding Context to manifestparser based Manifests" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr> <div role="contentinfo"> <p></p> </div> Built with <a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://www.sphinx-doc.org/">Sphinx</a> using a <a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> <script>function gtElInit() {var lib = new google.translate.TranslateService();lib.translatePage('pl', 'iw', function () {});}</script> <script src="https://translate.google.com/translate_a/element.js?cb=gtElInit&amp;hl=en-GB&amp;client=wt" type="text/javascript"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10