CINXE.COM

TPS — 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/tps/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>TPS — 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=a7d3e023"> <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 type="module" src="https://cdn.jsdelivr.net/npm/mermaid@11.2.0/dist/mermaid.esm.min.mjs"></script> <script type="module" src="https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0.1.4/dist/mermaid-layout-elk.esm.min.mjs"></script> <script type="module">import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.2.0/dist/mermaid.esm.min.mjs";import elkLayouts from "https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@0.1.4/dist/mermaid-layout-elk.esm.min.mjs";mermaid.registerLayoutLoaders(elkLayouts);mermaid.initialize({startOnLoad:false});</script> <script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script> <script type="module"> import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11.2.0/dist/mermaid.esm.min.mjs"; window.addEventListener("load", () => mermaid.run()); </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="web-platform-tests" href="../../web-platform/index.html"> <link rel="prev" title="XPCShell tests" href="../xpcshell/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.1hbgkFx4Qn8.O/am=DgY/d=1/rs=AN8SPfqlmAPxwfG457BPbRXwNq39oSMGHg/m=corsproxy" data-sourceurl="https://firefox-source-docs.mozilla.org/testing/tps/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.1hbgkFx4Qn8.O/am=DgY/d=1/exm=corsproxy/ed=1/rs=AN8SPfqlmAPxwfG457BPbRXwNq39oSMGHg/m=phishing_protection" data-phishing-protection-enabled="false" data-forms-warning-enabled="true" data-source-url="https://firefox-source-docs.mozilla.org/testing/tps/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.1hbgkFx4Qn8.O/am=DgY/d=1/exm=corsproxy,phishing_protection/ed=1/rs=AN8SPfqlmAPxwfG457BPbRXwNq39oSMGHg/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/tps/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/tps/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/tps/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/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/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 Platform</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/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"><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">Automated Testing</a></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 current"><a class="current 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> <ul> <li class="toctree-l2"><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#table-of-contents">Table of Contents</a></li> <li class="toctree-l2"><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#what-is-tps">What is TPS</a></li> <li class="toctree-l2"><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#why-tps-exists">Why TPS exists</a></li> <li class="toctree-l2"><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#architecture">Architecture</a> <ul> <li class="toctree-l3"><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#high-level-diagram">High level Diagram</a></li> <li class="toctree-l3"><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#single-test-sequence-diagram">Single Test Sequence Diagram</a></li> <li class="toctree-l3"><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#phases">Phases</a> <ul> <li class="toctree-l4"><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#example">Example</a></li> </ul></li> <li class="toctree-l3"><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#the-tps-extension">The TPS Extension</a></li> </ul></li> <li class="toctree-l2"><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#test-format">Test Format</a> <ul> <li class="toctree-l3"><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#test-group-configuration">Test group configuration</a></li> <li class="toctree-l3"><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#test-files">Test Files</a> <ul> <li class="toctree-l4"><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#the-phases-object">The phases object</a></li> <li class="toctree-l4"><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#test-file-capabilities">Test File Capabilities</a></li> </ul></li> </ul></li> <li class="toctree-l2"><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#writing-new-tps-tests">Writing new TPS tests</a></li> <li class="toctree-l2"><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#how-to-run-tps">How to run TPS</a> <ul> <li class="toctree-l3"><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#installation">Installation</a></li> <li class="toctree-l3"><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#configuration">Configuration</a> <ul> <li class="toctree-l4"><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#setting-up-test-accounts">Setting Up Test Accounts</a></li> </ul></li> </ul></li> </ul></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> </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">TPS</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/tps/index%26comment%3DURL%2B%3D%2Bhttps://firefox-source-docs.mozilla.org/testing/tps/index.html%26bug_file_loc%3Dhttps://firefox-source-docs.mozilla.org/testing/tps/index.html" rel="nofollow">Report an issue</a> / <a href="https://firefox--source--docs-mozilla-org.translate.goog/_sources/testing/tps/index.md.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="tps"> <h1>TPS<a class="headerlink" 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" title="Link to this heading">¶</a></h1> <section id="table-of-contents"> <h2>Table of Contents<a class="headerlink" 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#table-of-contents" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p><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#what-is-tps">What is TPS</a></p></li> <li><p><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#why-tps-exists">Why TPS Exists</a></p></li> <li><p><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#architecture">Architecture</a></p></li> <li><p><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#test-format">Test Format</a></p></li> <li><p><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#writing-new-tps-tests">Writing new TPS tests</a></p></li> <li><p><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#how-to-run-tps">How to run TPS</a></p></li> </ul> <p>The majority of this document is targeting the Firefox developer that would like to understand TPS and/or write TPS tests. If you’d like to simply run TPS, see the <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#how-to-run-tps">How to run TPS</a> section.</p> </section> <section id="what-is-tps"> <h2>What is TPS<a class="headerlink" 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#what-is-tps" title="Link to this heading">¶</a></h2> <p>TPS is a test automation framework for Firefox Sync. TPS takes in test configuration as JavaScript files defined in <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#test-format">a configuration file</a> and runs all tests in sequence.</p> <p>Each TPS test is made of one or more <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#phases">phases</a> that each have their own assertions and run in sequence. If <strong>any</strong> phase fails, then the test fails and the remaining phases are not run. However, other tests will still run.</p> </section> <section id="why-tps-exists"> <h2>Why TPS exists<a class="headerlink" 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#why-tps-exists" title="Link to this heading">¶</a></h2> <p>TPS runs against the real Mozilla Accounts server and Sync servers and thus is a good way to test Firefox Sync end-to-end without mocking the servers.</p> </section> <section id="architecture"> <h2>Architecture<a class="headerlink" 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#architecture" title="Link to this heading">¶</a></h2> <section id="high-level-diagram"> <h3>High level Diagram<a class="headerlink" 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#high-level-diagram" title="Link to this heading">¶</a></h3> <p>The following diagram describes the flow when running TPS.</p> <pre class="mermaid"> flowchart TD TPS[TPS Runner]--&gt;T[Run Test Suite] T--&gt;T1[Run Next Single Test] T1--&gt;S[Setup] S--&gt;P[Run Next Phase] P--&gt;LP[Launch Test Profile] LP--&gt;Q{Phase Success?} Q--&gt;|No| CL[Clean up] Q--&gt;|Yes| Q2{Any more phases?} Q2--&gt;|Yes|P Q2--&gt;|No| CL CL--&gt;CR[Collect Results] CR--&gt;Q3{Any more tests?} Q3--&gt;|Yes|T1 Q3--&gt;|No| D[Done] </pre> </section> <section id="single-test-sequence-diagram"> <h3>Single Test Sequence Diagram<a class="headerlink" 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#single-test-sequence-diagram" title="Link to this heading">¶</a></h3> <p>The following sequence diagram describes the involved entities executing a single TPS test</p> <pre class="mermaid"> sequenceDiagram actor U as User participant TPS as TPS Runner participant F as Firefox Profile participant TE as TPS Extension U-&gt;&gt;TPS: Start test TPS-&gt;&gt;TPS: Parse Test file loop Every Phase TPS-&gt;&gt;F: Launch Phase w/prefs to install TPS extension F-&gt;&gt;TE: Install Extension TE-&gt;&gt;F: Read prefs to get test file F-&gt;&gt;TE: Test file and TPS Runner configuration loop Every instruction TE-&gt;&gt;F: Execute test instructions and assertions F-&gt;&gt;TE: Result end TE-&gt;&gt;F: Phase Done F-&gt;&gt;TPS: Done TPS-&gt;&gt;F: Read logs to get test results end TPS-&gt;&gt;U: Print test results </pre> </section> <section id="phases"> <h3>Phases<a class="headerlink" 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#phases" title="Link to this heading">¶</a></h3> <p>Each Phase is mapped to a Firefox profile, phases may re-use profiles if they are mapped to them, see <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#the-phases-object">the phases object</a> for details on the mapping. All phases are signed in to the same Mozilla Account.</p> <section id="example"> <h4>Example<a class="headerlink" 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#example" title="Link to this heading">¶</a></h4> <p>For example, a simple test that defines two phases, one that uploads bookmarks and another that downloads them can be described as follows, see the section on <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#test-format">Test Format</a> for details on the format of the tests.</p> <div class="highlight-js notranslate"> <div class="highlight"> <pre><span></span><span class="nx">EnableEngines</span><span class="p">([</span><span class="s2">"bookmarks"</span><span class="p">]);</span><span class="w"> </span><span class="c1">// Enables the bookmark engine across all profiles(phases) that this test runs</span> <span class="cm">/*</span> <span class="cm"> * The list of phases mapped to their corresponding profiles. The object</span> <span class="cm"> * here must be in JSON format as it will get parsed by the Python</span> <span class="cm"> * testrunner. It is parsed by the YAML package, so it relatively flexible.</span> <span class="cm"> */</span> <span class="kd">var</span><span class="w"> </span><span class="nx">phases</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">phase1</span><span class="o">:</span><span class="w"> </span><span class="s2">"profile1"</span><span class="p">,</span> <span class="w"> </span><span class="nx">phase2</span><span class="o">:</span><span class="w"> </span><span class="s2">"profile2"</span><span class="p">,</span> <span class="p">};</span> <span class="c1">// the initial list of bookmarks to add to the browser</span> <span class="kd">var</span><span class="w"> </span><span class="nx">bookmarksInitial</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">menu</span><span class="o">:</span><span class="w"> </span><span class="p">[</span> <span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nx">folder</span><span class="o">:</span><span class="w"> </span><span class="s2">"foldera"</span><span class="w"> </span><span class="p">},</span> <span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nx">folder</span><span class="o">:</span><span class="w"> </span><span class="s2">"folderb"</span><span class="w"> </span><span class="p">},</span> <span class="w"> </span><span class="p">],</span> <span class="w"> </span><span class="s2">"menu/foldera"</span><span class="o">:</span><span class="w"> </span><span class="p">[{</span><span class="w"> </span><span class="nx">uri</span><span class="o">:</span><span class="w"> </span><span class="s2">"http://www.cnn.com"</span><span class="p">,</span><span class="w"> </span><span class="nx">title</span><span class="o">:</span><span class="w"> </span><span class="s2">"CNN"</span><span class="w"> </span><span class="p">}],</span><span class="w"> </span><span class="c1">// One bookmark in menu/foldera pointing to CNN</span> <span class="w"> </span><span class="s2">"menu/folderb"</span><span class="o">:</span><span class="w"> </span><span class="p">[{</span><span class="w"> </span><span class="nx">uri</span><span class="o">:</span><span class="w"> </span><span class="s2">"http://www.apple.com"</span><span class="p">,</span><span class="w"> </span><span class="nx">title</span><span class="o">:</span><span class="w"> </span><span class="s2">"Apple"</span><span class="p">}],</span><span class="w"> </span><span class="c1">// One bookmark in menu/folderb pointing to apple</span> <span class="p">};</span> <span class="c1">// Add bookmarks to profile1 and sync.</span> <span class="nx">Phase</span><span class="p">(</span><span class="s2">"phase1"</span><span class="p">,</span><span class="w"> </span><span class="p">[</span> <span class="w"> </span><span class="p">[</span><span class="nx">Bookmarks</span><span class="p">.</span><span class="nx">add</span><span class="p">,</span><span class="w"> </span><span class="nx">bookmarksInitial</span><span class="p">],</span> <span class="w"> </span><span class="p">[</span><span class="nx">Bookmarks</span><span class="p">.</span><span class="nx">verify</span><span class="p">,</span><span class="w"> </span><span class="nx">bookmarksInitial</span><span class="p">],</span> <span class="w"> </span><span class="p">[</span><span class="nx">Sync</span><span class="p">],</span> <span class="w"> </span><span class="p">[</span><span class="nx">Bookmarks</span><span class="p">.</span><span class="nx">verify</span><span class="p">,</span><span class="w"> </span><span class="nx">bookmarksInitial</span><span class="p">],</span> <span class="p">]);</span> <span class="c1">// Sync, then verify that bookmarks added by phase 1 are present.</span> <span class="nx">Phase</span><span class="p">(</span><span class="s2">"phase2"</span><span class="p">,</span><span class="w"> </span><span class="p">[</span> <span class="w"> </span><span class="p">[</span><span class="nx">Sync</span><span class="p">],</span> <span class="w"> </span><span class="p">[</span><span class="nx">Bookmarks</span><span class="p">.</span><span class="nx">verify</span><span class="p">,</span><span class="w"> </span><span class="nx">bookmarksInitial</span><span class="p">],</span> <span class="p">]);</span> </pre> </div> </div> </section> </section> <section id="the-tps-extension"> <h3>The TPS Extension<a class="headerlink" 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#the-tps-extension" title="Link to this heading">¶</a></h3> <p>When the Firefox profile representing the phase loads, it first installs an <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/services/sync/tps/extensions/tps">extension</a>. The extension is what executes the tests by instructing Firefox and reading from Firefox to assert that Sync is working properly.</p> <p>The test files execute in the extension, and the <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/services/sync/tps/extensions/tps/resource/tps.sys.mjs">extension defines all the functions that the test files may use</a>. For instance, in the above <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#example">example</a> the <code class="docutils literal notranslate"><span class="pre">Phase</span></code> function is defined <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tps/extensions/tps/resource/tps.sys.mjs%231234">here</a></p> </section> </section> <section id="test-format"> <h2>Test Format<a class="headerlink" 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#test-format" title="Link to this heading">¶</a></h2> <section id="test-group-configuration"> <h3>Test group configuration<a class="headerlink" 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#test-group-configuration" title="Link to this heading">¶</a></h3> <p>The tests are referenced by a <code class="docutils literal notranslate"><span class="pre">json</span></code> file that references all the tests TPS will run. By default TPS will run the configuration in <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/services/sync/tests/tps/all_tests.json"><code class="docutils literal notranslate"><span class="pre">services/sync/tests/tps/all_tests.json</span></code></a>. The test group configuration is a <code class="docutils literal notranslate"><span class="pre">json</span></code> object with one key named <code class="docutils literal notranslate"><span class="pre">tests</span></code> that is itself a <code class="docutils literal notranslate"><span class="pre">json</span></code> object. The <code class="docutils literal notranslate"><span class="pre">tests</span></code> object has a key for every test to run, and the key should be the name of the <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#test-files">test file</a>. The value for each test file is the empty object <code class="docutils literal notranslate"><span class="pre">{}</span></code> if the test should run, or <code class="docutils literal notranslate"><span class="pre">{"disabled":</span> <span class="pre">"Bug</span> <span class="pre">&lt;BUG</span> <span class="pre">NUMBER&gt;"}</span></code> where <code class="docutils literal notranslate"><span class="pre">&lt;BUG</span> <span class="pre">NUMBER&gt;</span></code> is a Bugzilla bug number referencing why the test was disabled.</p> </section> <section id="test-files"> <h3>Test Files<a class="headerlink" 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#test-files" title="Link to this heading">¶</a></h3> <section id="the-phases-object"> <h4>The phases object<a class="headerlink" 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#the-phases-object" title="Link to this heading">¶</a></h4> <p>Test Files are JavaScript files that will be run by the TPS extension once the Firefox profile is loaded. However, before that is done the TPS framework will load the first object defined in test file as <code class="docutils literal notranslate"><span class="pre">yaml</span></code>. In other words, for the following example:</p> <div class="highlight-js notranslate"> <div class="highlight"> <pre><span></span><span class="kd">var</span><span class="w"> </span><span class="nx">phases</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">phase1</span><span class="o">:</span><span class="w"> </span><span class="s2">"profile1"</span><span class="p">,</span> <span class="w"> </span><span class="nx">phase2</span><span class="o">:</span><span class="w"> </span><span class="s2">"profile2"</span><span class="p">,</span> <span class="w"> </span><span class="nx">phase3</span><span class="o">:</span><span class="w"> </span><span class="s2">"profile1"</span><span class="p">,</span><span class="w"> </span><span class="c1">// phase 1 and 3 reuse the same profile, "profile1"</span> <span class="p">}</span> <span class="c1">// ... rest of the test file</span> </pre> </div> </div> <p>The inside of the curly brackets will be parsed as yaml to identify the profiles that TPS will run and map each phase to a profile. In the example above, <code class="docutils literal notranslate"><span class="pre">phase1</span></code> and <code class="docutils literal notranslate"><span class="pre">phase3</span></code> reuse the same profile, but <code class="docutils literal notranslate"><span class="pre">phase2</span></code> uses it’s own profile. The rest of the file is regular JavaScript that will be loaded in the <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#the-tps-extension">TPS Extension</a>.</p> </section> <section id="test-file-capabilities"> <h4>Test File Capabilities<a class="headerlink" 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#test-file-capabilities" title="Link to this heading">¶</a></h4> <p>The TPS Extension exports a set of functions and objects that test files may use. See the <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/services/sync/tps/extensions/tps/resource/tps.sys.mjs"><code class="docutils literal notranslate"><span class="pre">tps.sys.mjs</span></code></a> for up-to-date details, the following is the list of export capabilities as of April 10th, 2024:</p> <section id="enabling-sync-engines"> <h5>Enabling Sync Engines<a class="headerlink" 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#enabling-sync-engines" title="Link to this heading">¶</a></h5> <p>To enable sync engines, which you should do before executing a test that depends on an engine, use the <code class="docutils literal notranslate"><span class="pre">EnableEngines</span></code> function. The function takes an array of strings representing the engine names. Eg:</p> <div class="highlight-js notranslate"> <div class="highlight"> <pre><span></span><span class="nx">EnableEngines</span><span class="p">([</span><span class="s2">"bookmarks"</span><span class="p">,</span><span class="w"> </span><span class="s2">"history"</span><span class="p">]);</span> </pre> </div> </div> </section> <section id="start-a-phase"> <h5>Start a phase<a class="headerlink" 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#start-a-phase" title="Link to this heading">¶</a></h5> <p>Phases are run on their assigned profiles profiles in the order they are declared in <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#the-phases-object">the phases object</a>. To define what a phase does use the <code class="docutils literal notranslate"><span class="pre">Phase</span></code> function that takes in a phase name as the first argument - <strong>this should be the same name defined in the <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#the-phases-object">phases object</a></strong> - and a 2D array of actions as a second argument. Each action array in the 2D is run in sequence. The inner array defines what the action is, and any arguments to that action. For example:</p> <div class="highlight-js notranslate"> <div class="highlight"> <pre><span></span><span class="nx">Phase</span><span class="p">(</span><span class="s2">"phase1"</span><span class="p">,</span><span class="w"> </span><span class="p">[[</span><span class="nx">Sync</span><span class="p">],</span><span class="w"> </span><span class="p">[</span><span class="nx">Bookmarks</span><span class="p">.</span><span class="nx">add</span><span class="p">,</span><span class="w"> </span><span class="nx">bookmarkInitial</span><span class="p">]]);</span> </pre> </div> </div> <p>Note that the example assumes that the phases object and <code class="docutils literal notranslate"><span class="pre">bookmarkInitial</span></code> are defined in test file.</p> <p>In the above example:</p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">"phase1"</span></code> is the name of the phase, which should match exactly the phase name as defined in <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#the-phases-object">the phases object</a>.</p></li> <li><p>The 2D array passed as the second argument has:</p> <ul> <li><p><code class="docutils literal notranslate"><span class="pre">[Sync]</span></code> as its first array which means that the phase will first Sync</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">[Bookmarks.add,</span> <span class="pre">bookmarkInitial]</span></code> as its second member which means that after the Sync, a Bookmarks.add operation will run, and it will add the <code class="docutils literal notranslate"><span class="pre">bookmarkInitial</span></code>.</p></li> </ul></li> </ul> </section> <section id="actions"> <h5>Actions<a class="headerlink" 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#actions" title="Link to this heading">¶</a></h5> <p>Actions are run inside phases as arguments to the <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#start-a-phase"><code class="docutils literal notranslate"><span class="pre">Phase</span></code></a> function.</p> <section id="general-actions"> <h6>General Actions<a class="headerlink" 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#general-actions" title="Link to this heading">¶</a></h6> <p>There are few general actions that aren’t tied to a data type:</p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">Sync</span></code>: Will trigger a sync</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Login</span></code>: Logs in to Mozilla Account. <strong>You shouldn’t need to do this in most cases as it is done automatically</strong></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">WipeServer</span></code>: Will wipe all data from the server</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">EnsureTracking</span></code>: Will wait until sync tracking has started. <strong>You shouldn’t need to do this in most cases</strong></p></li> </ul> </section> <section id="data-type-specific-actions"> <h6>Data Type specific Actions<a class="headerlink" 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#data-type-specific-actions" title="Link to this heading">¶</a></h6> <p>Some actions are supported for individual data types. Those actions are triggered by using <code class="docutils literal notranslate"><span class="pre">&lt;DataType&gt;.&lt;Action&gt;</span></code>. The following is a list of all possible <code class="docutils literal notranslate"><span class="pre">&lt;DataType&gt;</span></code> values: For more details on which actions are supported for which data type, see the following sections.</p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">Bookmarks</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Tabs</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Formdata</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">History</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Passwords</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Addons</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Addresses</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">CreditCards</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">ExtStorage</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Prefs</span></code></p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Windows</span></code></p></li> </ul> <p><strong>Bookmarks Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_existing_bookmarks.js">test_existing_bookmarks.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: To add a bookmark tree</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">modify</span></code>: To modify the existing bookmark tree</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">delete</span></code>: To remove a bookmark node from the tree</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: To verify the bookmark tree matches exactly the tree given, otherwise fails the phase</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verifyNot</span></code>: The inverse of verify, fails the phase if the bookmark tree matches the given tree</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">skipValidation</span></code>: To tell Firefox to stop validating bookmark trees.</p></li> </ul> <p><strong>Addresses Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_addresses.js">test_addresses.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: Adds an array of addresses</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">modify</span></code>: Modifies the list of addresses to what was given</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">delete</span></code>: Deletes the given addresses</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: Verifies that the addresses match exactly the given list, otherwise fails the phase</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verifyNot</span></code>: The inverse of verify, fails the phase if the list of addresses matches the given list.</p></li> </ul> <p><strong>CreditCard Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_creditcards.js">test_creditcards.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: Adds an array of credit cards</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">modify</span></code>: Modifies the list of credit cards to what was given</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">delete</span></code>: Deletes the given credit cards</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: Verifies that the credit cards match exactly the given list, otherwise fails the phase</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verifyNot</span></code>: The inverse of verify, fails the phase if the list of credit cards matches the given list.</p></li> </ul> <p><strong>Addons Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_addon_reconciling.js">test_addon_reconciling.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">installs</span></code>: installs a list of addons</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">setEnabled</span></code>: Enables or disables a list of addons</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">uninstall</span></code>: Uninstalls a list of addons</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: Verifies that the addons match exactly the given list, otherwise fails the phase</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verifyNot</span></code>: The inverse of verify, fails the phase if the list of addons matches the given list.</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">skipValidation</span></code>: Tells Firefox to stop validating Addons.</p></li> </ul> <p><strong>Formdata Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_formdata.js">test_formdata.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: Adds an array of form data</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">delete</span></code>: Deletes the given form data</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: Verifies that form data match exactly the given list, otherwise fails the phase</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verifyNot</span></code>: The inverse of verify, fails the phase if the form data matches the given list.</p></li> </ul> <p><strong>History Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_history.js">test_history.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: Adds an array of history items</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">delete</span></code>: Deletes the given history items</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: Verifies that form data match exactly the given list, otherwise fails the phase</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verifyNot</span></code>: The inverse of verify, fails the phase if the form data matches the given list.</p></li> </ul> <p><strong>Passwords Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_passwords.js">test_passwords.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: To add a list of logins</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">modify</span></code>: To modify the existing list of logins based on changes in the given list</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">delete</span></code>: To remove a list of logins</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: To verify the list of logins matches exactly the list given, otherwise fails the phase</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verifyNot</span></code>: The inverse of verify, fails the phase if the logins matches the given list</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">skipValidation</span></code>: To tell Firefox to stop validating logins</p></li> </ul> <p><strong>Prefs Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_prefs.js">test_prefs.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">modify</span></code>: To modify the existing prefs based on changes in the given list</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: To verify the values of the given prefs match the values given, otherwise fails the phase</p></li> </ul> <p><strong>Tabs Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_tabs.js">test_tabs.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: To add a new list of remote tabs, each annotated with which profile it belongs to</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: To verify the values of remote tabs matches the given list, otherwise fails the phase</p></li> </ul> <p><strong>Windows Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_privbrw_tabs.js%2379-84">test_privbrw_tabs.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">add</span></code>: Adds a new window with the given configuration</p></li> </ul> <p><strong>ExtStorage Actions</strong></p> <p>Example in <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/rev/1f27a4022f9f1269d897526c1c892a57743e650c/services/sync/tests/tps/test_extstorage.js">test_extstorage.js</a></p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">set</span></code>: Sets the value of given key to the given value</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">verify</span></code>: Verifies that the value of the given key is the given value, fails the phase otherwise.</p></li> </ul> </section> </section> </section> </section> </section> <section id="writing-new-tps-tests"> <h2>Writing new TPS tests<a class="headerlink" 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#writing-new-tps-tests" title="Link to this heading">¶</a></h2> <p>To write new TPS tests follow the following instructions:</p> <ol class="arabic simple"> <li><p>Create a new <code class="docutils literal notranslate"><span class="pre">.js</span></code> file in <code class="docutils literal notranslate"><span class="pre">services/sync/tests/tps</span></code> named <code class="docutils literal notranslate"><span class="pre">test_&lt;my_test_name&gt;.js</span></code></p></li> <li><p>Link to the file in the <code class="docutils literal notranslate"><span class="pre">services/sync/tests/tps/all_tests.json</span></code></p></li> <li><p>Follow the format described in <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#test-files">Test Files</a></p></li> <li><p>Make sure to test the file by <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#how-to-run-tps">running TPS</a></p></li> </ol> </section> <section id="how-to-run-tps"> <h2>How to run TPS<a class="headerlink" 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#how-to-run-tps" title="Link to this heading">¶</a></h2> <section id="installation"> <h3>Installation<a class="headerlink" 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#installation" title="Link to this heading">¶</a></h3> <p>TPS requires several packages to operate properly. To install TPS and required packages, use the create_venv.py script provided in the <code class="docutils literal notranslate"><span class="pre">testing/tps</span></code> directory:</p> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span>python3<span class="w"> </span>create_venv.py<span class="w"> </span>/path/to/create/virtualenv </pre> </div> </div> <p>This script will create a virtalenv and install TPS into it.</p> <p>You must then activate the virtualenv by executing:</p> <ul class="simple"> <li><p>(mac/linux):</p></li> </ul> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span><span class="nb">source</span><span class="w"> </span>/path/to/virtualenv/Scripts/activate </pre> </div> </div> <ul class="simple"> <li><p>(win):</p></li> </ul> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span>/path/to/virtualenv/Scripts/activate.bat </pre> </div> </div> <p>TPS can then be run by executing:</p> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span>runtps<span class="w"> </span>--binary<span class="o">=</span>/path/to/firefox </pre> </div> </div> <blockquote> <div> <p>Note: You can run the tps tests in headless mode by using <code class="docutils literal notranslate"><span class="pre">MOZ_HEADLESS=1</span></code>. This will make your computer somewhat useable while the tests are running.</p> </div> </blockquote> <p>When you are done with TPS, you can deactivate the virtualenv by executing <code class="docutils literal notranslate"><span class="pre">deactivate</span></code></p> </section> <section id="configuration"> <h3>Configuration<a class="headerlink" 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#configuration" title="Link to this heading">¶</a></h3> <p>To edit the TPS configuration, do not edit config/config.json.in in the tree. Instead, edit config.json inside your virtualenv; it will be located at the top level of where you specified the virtualenv be created - eg, for the example above, it will be <code class="docutils literal notranslate"><span class="pre">/path/to/create/virtualenv/config.json</span></code></p> <section id="setting-up-test-accounts"> <h4>Setting Up Test Accounts<a class="headerlink" 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#setting-up-test-accounts" title="Link to this heading">¶</a></h4> <section id="mozilla-accounts"> <h5>Mozilla Accounts<a class="headerlink" 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#mozilla-accounts" title="Link to this heading">¶</a></h5> <p>To create a test account for using the Mozilla Account authentication perform the following steps:</p> <blockquote> <div> <p>Note: Currently, the TPS tests rely on how restmail returns the verification code You should use restmail or something very similar. Gmail and other providers might give a <code class="docutils literal notranslate"><span class="pre">The</span> <span class="pre">request</span> <span class="pre">was</span> <span class="pre">blocked</span> <span class="pre">for</span> <span class="pre">security</span> <span class="pre">reasons</span></code></p> </div> </blockquote> <ol class="arabic simple"> <li><p>Go to the URL: http://restmail.net/mail/%account_prefix%@restmail.net</p></li> </ol> <ul class="simple"> <li><p>Replace <code class="docutils literal notranslate"><span class="pre">%account_prefix%</span></code> with your own test name</p></li> </ul> <ol class="arabic simple" start="2"> <li><p>Go to https://accounts.firefox.com/signup?service=sync&amp;context=fx_desktop_v1</p></li> <li><p>Sign in with the previous chosen email address and a password</p></li> <li><p>Go back to the Restmail URL, reload the page</p></li> <li><p>Search for the verification link and open that page</p></li> </ol> <p>Now you will be able to use this account for TPS. Note that these steps can be done in either a test profile or in a private browsing window - you might want to avoid doing that in a “real” profile that’s already connected to Sync.</p> </section> </section> </section> </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/testing/xpcshell/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="btn btn-neutral float-left" title="XPCShell tests" 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/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="btn btn-neutral float-right" title="web-platform-tests" 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