Datasets:
Download web/detox.github.io/reference/site/docs/introduction/debugging/index.html from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 106 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/detox.github.io/reference/site/docs/introduction/debugging/index.html
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/detox.github.io/reference/site/docs/introduction/debugging/index.html
-
curl -L -o index.html https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/detox.github.io/reference/site/docs/introduction/debugging/index.html
106 kB
| <html class="docs-wrapper docs-doc-page docs-version-20.x plugin-docs plugin-id-default docs-doc-id-introduction/debugging show--consent" data-has-hydrated="true" data-rh="lang,dir,class,data-has-hydrated" data-theme="dark" dir="ltr" lang="en"><head> | |
| <meta charset="utf-8"/> | |
| <meta content="Docusaurus v2.4.3" name="generator"/> | |
| <title>How to Debug | Detox</title><meta content="summary_large_image" data-rh="true" name="twitter:card"/><meta content="en" data-rh="true" name="docusaurus_locale"/><meta content="en" data-rh="true" name="docsearch:language"/><meta content="20.x" data-rh="true" name="docusaurus_version"/><meta content="docs-default-20.x" data-rh="true" name="docusaurus_tag"/><meta content="20.x" data-rh="true" name="docsearch:version"/><meta content="docs-default-20.x" data-rh="true" name="docsearch:docusaurus_tag"/><meta content="How to Debug | Detox" data-rh="true" property="og:title"/><meta content="In the Detox world, you can debug either Detox itself (i.e. run it step by step), and the tested app. This guide covers both options." data-rh="true" name="description"/><meta content="In the Detox world, you can debug either Detox itself (i.e. run it step by step), and the tested app. This guide covers both options." data-rh="true" property="og:description"/><link data-rh="true" href="/img/favicon.ico" rel="icon"/><link crossorigin="anonymous" data-rh="true" href="/_404.html" rel="preconnect"/><link href="/blog/rss.xml" rel="alternate" title="Detox RSS Feed" type="application/rss+xml"/> | |
| <link href="/blog/atom.xml" rel="alternate" title="Detox Atom Feed" type="application/atom+xml"/> | |
| <link href="/_404.html" rel="preconnect"/> | |
| <link href="/_404.html" rel="preconnect"/> | |
| <link href="/_404.html" rel="preconnect"/> | |
| <script>window.dataLayer=window.dataLayer||[]</script> | |
| <link href="/opensearch.xml" rel="search" title="Detox" type="application/opensearchdescription+xml"/> | |
| <script async="" src="/_cdn/platform.twitter.com/widgets.js"></script><link href="/assets/css/styles.2561cce4.css" rel="stylesheet"/> | |
| <link as="script" href="/assets/js/runtime~main.12cb17c3.js" rel="preload"/> | |
| <link as="script" href="/assets/js/main.899efd46.js" rel="preload"/> | |
| <link data-rh="true" href="/docs/introduction/debugging/" rel="canonical"/><link data-rh="true" href="/docs/introduction/debugging/" hreflang="en" rel="alternate"/><link data-rh="true" href="/docs/introduction/debugging/" hreflang="x-default" rel="alternate"/><meta content="width=device-width, initial-scale=1.0" data-rh="true" name="viewport"/><meta content="/docs/introduction/debugging/" data-rh="true" property="og:url"/><link href="/assets/js/c4f5d8e4.1d727c7d.js" rel="prefetch"/><link href="/assets/js/0ef19a76.b6a3804a.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/7c97e9a2.69c6c05c.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/bab8a798.39e6da23.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/dc701447.223344f6.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/f14c3b1d.750d68cc.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/79ac7843.08fb5e78.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/40113ee6.4668c785.js" rel="prefetch"/><link href="/assets/js/a6aa9e1f.f7d63002.js" rel="prefetch"/><link href="/assets/js/181d712d.f728104a.js" rel="prefetch"/><link href="/assets/js/814f3328.368bc5eb.js" rel="prefetch"/><link href="/assets/js/83eb08f7.4d5ec241.js" rel="prefetch"/><link href="/assets/js/9292650b.f26ac725.js" rel="prefetch"/><link href="/assets/js/933bed1e.d56d75f0.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/671ab86b.6febeedb.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/38bf2aac.bc710fb9.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/935f2afb.d4cfcd14.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/0c7edd3c.b76a84f9.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/af67069a.fce4d2a4.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/d8b689b0.68a25d1e.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/435645a6.e680c3f3.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/d9894068.9ef62e7b.js" rel="prefetch"/><link href="/assets/js/5fc994c2.0a3b56b5.js" rel="prefetch"/><link href="/assets/js/0ef19a76.b6a3804a.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/5b12c1a9.ead7646c.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/5eff386f.b247addc.js" rel="prefetch"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/a3ba877c.32533a8c.js" rel="prefetch"/><link href="/_cdn/unpkg.com/@68publishers/cookie-consent/dist/cookie-consent.css" rel="stylesheet"/><link href="/assets/js/a8a1de49.bab92bdd.js" rel="prefetch"/><link href="/assets/js/3fb5a56d.b5c89c21.js" rel="prefetch"/><link href="/assets/js/d350cff3.43602b60.js" rel="prefetch"/><link href="/assets/js/17896441.b40a6528.js" rel="prefetch"/><link href="/assets/js/9a6ca8b8.7d954869.js" rel="prefetch"/></head> | |
| <body class="navigation-with-keyboard" data-rh="class" style="overflow: visible;"> | |
| <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"dark")}()</script><div id="__docusaurus"><div class="banner_SLir"><a class="link_SNdm" href="/_404.html" rel="noopener noreferrer" target="_blank"><span class="uaFlag_wtbk"></span> This project is created with substantial contributions from our Ukrainian colleagues.<!-- --> <span class="hashtag_KSDo">#StandWithUkraine</span></a></div><div aria-label="Skip to main content" role="region"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-expanded="false" aria-label="Toggle navigation bar" class="navbar__toggle clean-btn" type="button"><svg aria-hidden="true" fill="currentColor" height="12" viewbox="0 0 19 12" width="19"><rect height="1" rx="0.5" stroke="currentColor" stroke-linecap="round" width="18" x="0.5" y="5.5"></rect><rect height="1" rx="0.5" stroke="currentColor" stroke-linecap="round" width="18" x="0.5" y="10.5"></rect><rect height="1" rx="0.5" stroke="currentColor" stroke-linecap="round" width="18" x="0.5" y="0.5"></rect></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img alt="Detox Logo" class="themedImage_ToTc themedImage--dark_i4oU" src="/img/logo.png"/></div><b class="navbar__title text--truncate">Detox</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/introduction/getting-started">Docs</a><a class="navbar__item navbar__link" href="/docs/config/overview">API</a><a class="navbar__item navbar__link" href="/docs/contributing">Contribute</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link header-showcase-link" href="/showcase">Showcase</a></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a aria-expanded="false" aria-haspopup="true" class="navbar__link" href="/docs/introduction/getting-started" role="button">20.x</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/next/introduction/debugging">Next</a></li><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/docs/introduction/debugging">20.x</a></li><li><a class="dropdown__link" href="/docs/19.x/">19.x</a></li></ul></div><a aria-label="GitHub repository" class="navbar__item navbar__link header-github-link" href="/_404.html" rel="noopener noreferrer" target="_blank"></a><div class="toggle_vylO colorModeToggle_DEke"><button aria-label="Switch between dark and light mode (currently dark mode)" aria-live="polite" class="clean-btn toggleButton_gllP" title="Switch between dark and light mode (currently dark mode)" type="button"><svg class="lightToggleIcon_pyhR" height="24" viewbox="0 0 24 24" width="24"><path d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z" fill="currentColor"></path></svg><svg class="darkToggleIcon_wfgR" height="24" viewbox="0 0 24 24" width="24"><path d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z" fill="currentColor"></path></svg></button></div><div class="searchWrapper_jYdA searchBox_ZlJk"><button aria-label="Search (Ctrl+K)" class="DocSearch DocSearch-Button" type="button"><span class="DocSearch-Button-Container"><svg aria-hidden="true" class="DocSearch-Search-Icon" height="20" viewbox="0 0 20 20" width="20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"><svg class="DocSearch-Control-Key-Icon" height="15" width="15"><path d="M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953" fill="none" stroke="currentColor" stroke-linecap="square" stroke-width="1.2"></path></svg></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div></div></div><div class="navbar-sidebar__backdrop" role="presentation"></div></nav><div class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX" id="__docusaurus_skipToContent_fallback"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a aria-expanded="true" class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" href="#">Introduction</a></div><ul class="menu__list" style="display:block;overflow:visible;height:auto"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" href="/docs/introduction/getting-started" tabindex="0">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" href="/docs/introduction/environment-setup" tabindex="0">Environment Setup</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" href="/docs/introduction/project-setup" tabindex="0">Project Setup</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" href="/docs/introduction/your-first-test" tabindex="0">Your First Test</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a aria-current="page" class="menu__link menu__link--active" href="/docs/introduction/debugging" tabindex="0">How to Debug</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" href="/docs/introduction/preparing-for-ci" tabindex="0">Preparing for CI</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a aria-expanded="false" class="menu__link menu__link--sublist menu__link--sublist-caret" href="#">Guides</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a aria-expanded="false" class="menu__link menu__link--sublist menu__link--sublist-caret" href="#">Pilot-Powered Detox Testing</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a aria-expanded="false" class="menu__link menu__link--sublist menu__link--sublist-caret" href="#">Troubleshooting</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/guide/migration">Migration Guide</a></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav aria-label="Breadcrumbs" class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg class="breadcrumbHomeIcon_YNFT" viewbox="0 0 24 24"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Introduction</span><meta content="1" itemprop="position"/></li><li class="breadcrumbs__item breadcrumbs__item--active" itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"><span class="breadcrumbs__link" itemprop="name">How to Debug</span><meta content="2" itemprop="position"/></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">Version: 20.x</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button class="clean-btn tocCollapsibleButton_TO0P" type="button">On this page</button></div><div class="theme-doc-markdown markdown"><h1>How to Debug</h1><p>In the Detox world, you can debug either Detox itself (i.e. run it step by step), and the tested app. This guide covers both options.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="running-detox-tests-step-by-step">Running Detox Tests Step-by-Step<a aria-label="Direct link to Running Detox Tests Step-by-Step" class="hash-link" href="#running-detox-tests-step-by-step" title="Direct link to Running Detox Tests Step-by-Step"></a></h2><p>Detox tests can be run step-by-step either using an IDE or by using Chrome debugger.</p><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewbox="0 0 12 16"><path d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z" fill-rule="evenodd"></path></svg></span>New in Detox</div><div class="admonitionContent_S0QG"><p>Detox now supports an interactive <strong>REPL</strong> (Read-Eval-Print Loop) mode for debugging. You can explore app state, issue commands, or pause test execution — all in real time.</p><p>Enable it via <code>--repl</code> CLI argument and add <code>await detox.REPL()</code> in test code.</p><p>→ <a href="/docs/guide/detox-repl"><strong>See full guide</strong></a></p></div></div><p>Start by running Detox using the Detox CLI alongside the inspection argument (<code>--inspect-brk</code>) and the file in which the test resides. For example:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-bash codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">detox </span><span class="token builtin class-name" style="color: rgb(189, 147, 249);">test</span><span class="token plain"> --inspect-brk -c android.emu.debug e2e/starter.test.js</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>You will see Detox starts and these logs:</p><div class="language-plain codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-plain codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Debugger listening on ws://127.0.0.1:9229/3dedd03b-8896-4ab8-a0a8-1b647abb9c98</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">For help, see: https://nodejs.org/en/docs/inspector</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>Now you can attach to Detox and tap-in into its execution process.</p><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewbox="0 0 14 16"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z" fill-rule="evenodd"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>To learn more about debugging with <code>--inspect-brk</code>, refer to <a href="/_404.html" rel="noopener noreferrer" target="_blank">Debugging — Getting Started</a> on the official Node.js website.</p></div></div><div class="tabs-container tabList__CuJ"><ul aria-orientation="horizontal" class="tabs" role="tablist"><li aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active" role="tab" tabindex="0">Webstorm</li><li aria-selected="false" class="tabs__item tabItem_LNqP" role="tab" tabindex="-1">vs-code</li><li aria-selected="false" class="tabs__item tabItem_LNqP" role="tab" tabindex="-1">Chrome</li></ul><div class="margin-top--md"><div class="tabItem_Ymn6" role="tabpanel"><p>Open your app project (where there tests are, among other things) on Webstorm.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="set-up-a-breakpoint">Set up a breakpoint<a aria-label="Direct link to Set up a breakpoint" class="hash-link" href="#set-up-a-breakpoint" title="Direct link to Set up a breakpoint"></a></h4><p>Open the file where the test you wish to run is. Mark it as <code>it.only</code>, and set up a breakpoint in a line that suites your needs (note: This can actually be inside a helper function or a test-driver's function):</p><p><img alt="Webstorm breakpoint" class="img_ev3q" height="286" loading="eager" src="/assets/images/breakpoint-542147deaa0700ca4abe01e9da6cf790.png" width="823"/></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="create--run-a-debug-configuration">Create & Run a debug configuration<a aria-label="Direct link to Create & Run a debug configuration" class="hash-link" href="#create--run-a-debug-configuration" title="Direct link to Create & Run a debug configuration"></a></h4><p>Go to Webstorm's <a href="/_404.html" rel="noopener noreferrer" target="_blank"><code>Edit Configurations</code></a>.</p><p>Tap the <code>+</code> button and select the Node.js option:</p><p><img alt="Webstorm edit configurations" class="img_ev3q" height="495" loading="eager" src="/assets/images/new-configuration-5c585e687427f26cee8c46fb92c50adc.png" width="280"/></p><p>Create a new debugging configuration using the default arguments (port 9229, etc.):</p><p><img alt="Webstorm node debugging configuration" class="img_ev3q" height="744" loading="eager" src="/assets/images/node-debug-configuration-8426af2b225ab1247ff296692400e3e4.png" width="867"/></p><p>Attach to Detox by "debugging" the new configuration (start it using the beetle button).</p><p><img alt="Webstorm start debug configuration" class="img_ev3q" height="62" loading="eager" src="/assets/images/run-debug-configuration-c880df4bf171947516272c97cf861460.png" width="395"/></p><p>Let Detox run until stopped at the break-point:</p><p><img alt="Webstorm stopped at breakpoint" class="img_ev3q" height="91" loading="eager" src="/assets/images/stopped-at-breakpoint-6d8084532c1fad3d6cb53fd507fc22a9.png" width="730"/></p><p>Run step-by-step using Webstorm's debugging actions (step-over, step-into, etc.)</p><p>Happy debugging!</p></div><div class="tabItem_Ymn6" hidden="" role="tabpanel"><p>Coming soon!</p></div><div class="tabItem_Ymn6" hidden="" role="tabpanel"><p>Edit your test file. Mark the test you wish to debug as <code>it.only</code>, and then add a <code>debugger</code> statement | |
| inside your test to mark a starting point, e.g.:</p><div class="language-diff codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockTitle_Ktv7">e2e/starter.test.js</div><div class="codeBlockContent_biex"><pre class="prism-code language-diff codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">describe('Example', () => {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> beforeAll(async () => {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> await device.launchApp();</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> });</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> </span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token deleted-sign deleted prefix deleted" style="color: rgb(255, 85, 85);">-</span><span class="token deleted-sign deleted line" style="color: rgb(255, 85, 85);"> it('should debug nicely :-)', async () => {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token deleted-sign deleted line" style="color: rgb(255, 85, 85);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> it.only('should debug nicely :-)', async () => {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> await element(by.text('Filter')).tap();</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> debugger;</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> });</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>Open <code>Google Chrome</code> and go to <code>chrome://inspect</code> tab, where you'll see <code>./node_modules/.bin/jest</code> as a remote | |
| target waiting until you click <code>inspect</code> to attach to it.</p><p><img class="img_ev3q" height="388" loading="eager" src="/assets/images/inspect-brk-1f9ff60afe8fa89209a9c8fa27ea7299.png" width="835"/></p><p>Happy debugging!</p></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="debugging-javascript-application-code">Debugging JavaScript application code<a aria-label="Direct link to Debugging JavaScript application code" class="hash-link" href="#debugging-javascript-application-code" title="Direct link to Debugging JavaScript application code"></a></h2><p>Use debug configurations of your app that rely on React Native Packager running on port 8081 (or another):</p><ul><li><code>ios.sim.debug</code></li><li><code>android.emu.debug</code></li></ul><p>For the rest of details, please refer to <a href="/_404.html" rel="noopener noreferrer" target="_blank">React Native – Debugging</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="debugging-native-application-code">Debugging Native application code<a aria-label="Direct link to Debugging Native application code" class="hash-link" href="#debugging-native-application-code" title="Direct link to Debugging Native application code"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="setting-detox-up-as-a-compiling-dependency">Setting Detox up as a compiling dependency<a aria-label="Direct link to Setting Detox up as a compiling dependency" class="hash-link" href="#setting-detox-up-as-a-compiling-dependency" title="Direct link to Setting Detox up as a compiling dependency"></a></h3><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewbox="0 0 14 16"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z" fill-rule="evenodd"></path></svg></span>Note</div><div class="admonitionContent_S0QG"><p>This step is optional. It is intended for investigating weird crashes or when contributing to Detox itself.</p></div></div><div class="tabs-container tabList__CuJ"><ul aria-orientation="horizontal" class="tabs" role="tablist"><li aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active" role="tab" tabindex="0">iOS</li><li aria-selected="false" class="tabs__item tabItem_LNqP" role="tab" tabindex="-1">Android</li></ul><div class="margin-top--md"><div class="tabItem_Ymn6" role="tabpanel"><ol><li><p>Go to <code>node_modules/detox</code> and extract <code>Detox-ios-src.tbz</code></p><p><img alt="extracted detox-ios-src directory" class="img_ev3q" height="460" loading="eager" src="/assets/images/extracted-ios-src-ae12bd6e062f06e7e7e1f41e3746edd9.png" width="817"/></p></li><li><p>Drag <code>Detox-ios-src/Detox.xcodeproj</code> into your Xcode project</p><p><img alt="Detox inside Xcode project" class="img_ev3q" height="284" loading="eager" src="/assets/images/drag-src-to-project-31530917b943a4034be35eaa96cf2379.png" width="269"/></p></li><li><p>Go to your project settings → <strong>General</strong> and add <strong>Detox.framework</strong> to <strong>Frameworks, Libraries, and Embedded Content</strong> (make sure <strong>Embed & Sign</strong> is selected under <strong>Embed</strong>)</p><p><img alt="embed Detox" class="img_ev3q" height="230" loading="eager" src="/assets/images/embed-detox-project-13a3184c5b6f136a0537b8c2fc57347b.png" width="675"/></p></li></ol><div class="theme-admonition theme-admonition-caution alert alert--warning admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewbox="0 0 16 16"><path d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z" fill-rule="evenodd"></path></svg></span>caution</div><div class="admonitionContent_S0QG"><p>Apps should not be submitted to the App Store with the Detox framework linked. Follow this guide only to debug Detox issues in your project. Once finished, make sure to remove <strong>Detox.framework</strong> from your project.</p></div></div></div><div class="tabItem_Ymn6" hidden="" role="tabpanel"><ol><li><p>Add in your Android project settings:</p><div class="language-diff codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockTitle_Ktv7">android/settings.gradle</div><div class="codeBlockContent_biex"><pre class="prism-code language-diff codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);">include ':detox'</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);">project(':detox').projectDir = new File(rootProject.projectDir, '../node_modules/detox/android/detox')</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></li><li><p>In your <em>root</em> build script register <code>google()</code> as a repository lookup point in all projects:</p><div class="language-diff codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockTitle_Ktv7">android/build.gradle</div><div class="codeBlockContent_biex"><pre class="prism-code language-diff codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">allprojects {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> repositories {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> // ...</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> google()</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> }</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">}</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>If <code>allprojects</code> section doesn't exist, then add it.</p></li><li><p>In your app’s build script, add to <code>dependencies</code> section:</p><div class="language-diff codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockTitle_Ktv7">android/app/build.gradle</div><div class="codeBlockContent_biex"><pre class="prism-code language-diff codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">dependencies {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> // ...</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token deleted-sign deleted prefix deleted" style="color: rgb(255, 85, 85);">-</span><span class="token deleted-sign deleted line" style="color: rgb(255, 85, 85);"> androidTestImplementation('com.wix:detox:+')</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token deleted-sign deleted line" style="color: rgb(255, 85, 85);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> androidTestImplementation(project(path: ":detox"))</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">}</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></li><li><p>Stay in that file, just scroll down and add to the <code>defaultConfig</code> subsection:</p><div class="language-diff codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockTitle_Ktv7">android/app/build.gradle</div><div class="codeBlockContent_biex"><pre class="prism-code language-diff codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">android {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> // ...</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> defaultConfig {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> // ...</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> testBuildType System.getProperty('testBuildType', 'debug') // This will later be used to control the test apk build type</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> missingDimensionStrategy 'detox', 'full'</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> }</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">}</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></li></ol></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="add-a-manual-configuration-to-your-detox-config">Add a "manual" configuration to your Detox config<a aria-label='Direct link to Add a "manual" configuration to your Detox config' class="hash-link" href="#add-a-manual-configuration-to-your-detox-config" title='Direct link to Add a "manual" configuration to your Detox config'></a></h3><div class="tabs-container tabList__CuJ"><ul aria-orientation="horizontal" class="tabs" role="tablist"><li aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active" role="tab" tabindex="0">iOS</li><li aria-selected="false" class="tabs__item tabItem_LNqP" role="tab" tabindex="-1">Android</li></ul><div class="margin-top--md"><div class="tabItem_Ymn6" role="tabpanel"><div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-json codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"devices"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"simulator"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"type"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"ios.simulator"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"device"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"type"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"<e.g., iPhone 12 Pro>"</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"apps"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"ios.debug"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"type"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"ios.app"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"binaryPath"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"<path to your app binary built before>"</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"configurations"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"ios.manual"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"device"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"simulator"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"app"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"ios.debug"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"behavior"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"launchApp"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"manual"</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"></span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div><div class="tabItem_Ymn6" hidden="" role="tabpanel"><div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-json codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"devices"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"emulator"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"type"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"android.emulator"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"device"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"avdName"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"<e.g., Pixel_API_28>"</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"apps"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"android.debug"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"type"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"android.apk"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"binaryPath"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"<path to your app binary built before>"</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"configurations"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"android.manual"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"device"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"emulator"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"app"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"android.debug"</span><span class="token punctuation" style="color: rgb(248, 248, 242);">,</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"behavior"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">{</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token property">"launchApp"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color: rgb(255, 121, 198);">"manual"</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line theme-code-block-highlighted-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> </span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"></span><span class="token punctuation" style="color: rgb(248, 248, 242);">}</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div></div></div><p>While the <code>behavior</code> section is a <strong>mandatory</strong> thing to include, there are a few more optional | |
| parameters to disable various side effects and make life easier when debugging:</p><div class="language-diff codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-diff codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">{</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> …</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> "configurations": {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> "<your configuration>": {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> …</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> "behavior": {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> "launchApp": "manual"</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> },</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "session": {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "autoStart": true,</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "debugSynchronization": 0,</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "server": "ws://localhost:8099",</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "sessionId": "test"</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> },</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "testRunner": {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "args": {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "testTimeout": 999999</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> }</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> }</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> "artifacts": false</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> },</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> }</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">}</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><ul><li><p>Using a preconfigured <code>session</code> with an auto-starting server removes the legwork of copying and | |
| pasting values to the instrumentation runner launch arguments dialog every time before any launch | |
| from the IDE. Otherwise, by default when the <code>session</code> object omitted, <code>server</code> and <code>sessionId</code> | |
| are randomly generated for every new test session.</p></li><li><p>The <code>debugSynchronization: 0</code> override matters only if you have a global <code>session</code> config | |
| with <code>debugSynchronization</code> set to a positive integer value. Otherwise, it is not needed. The point | |
| is to disable regular app polling requests during debugging, since that only can hinder the debugging.</p></li><li><p>If you are using Jest as a test runner, you might want to prolong the test timeout via forwarding | |
| <code>--testTimeout 999999</code> to it.</p></li><li><p>Setting <code>artifacts: false</code> override also matters only if you have a global <code>artifacts</code> config. | |
| The motivation is to disable irrelevant taxing activities on the device such as capturing logs | |
| screenshots, videos and so on. If your investigation addresses a specific artifact plugin glitch | |
| on the native side, then just disable all the non-relevant plugins. See | |
| <a href="/docs/config/artifacts">Configuration > Artifacts</a> document for the reference.</p></li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="run-a-specific-test">Run a specific test<a aria-label="Direct link to Run a specific test" class="hash-link" href="#run-a-specific-test" title="Direct link to Run a specific test"></a></h3><p>Usually, you would want to focus on a specific test suite to save time, e.g.:</p><div class="tabs-container tabList__CuJ"><ul aria-orientation="horizontal" class="tabs" role="tablist"><li aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active" role="tab" tabindex="0">iOS</li><li aria-selected="false" class="tabs__item tabItem_LNqP" role="tab" tabindex="-1">Android</li></ul><div class="margin-top--md"><div class="tabItem_Ymn6" role="tabpanel"><div class="language-sh codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-sh codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">detox test -c ios.manual e2e/someSuite.test.js</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div><div class="tabItem_Ymn6" hidden="" role="tabpanel"><div class="language-sh codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-sh codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">detox test -c android.manual e2e/someSuite.test.js</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></div></div></div><div class="theme-admonition theme-admonition-caution alert alert--warning admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewbox="0 0 16 16"><path d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z" fill-rule="evenodd"></path></svg></span>caution</div><div class="admonitionContent_S0QG"><p>Don't use multiple workers, e.g. <code>-w, --maxWorkers</code> for Jest, if you set <code>session.sessionId</code> to a constant value.</p></div></div><p>Afterwards, you should see your test suite starting as usual until it reaches the app launch, where | |
| Detox stops instead and prompts you to launch the app from the IDE:</p><div class="tabs-container tabList__CuJ"><ul aria-orientation="horizontal" class="tabs" role="tablist"><li aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active" role="tab" tabindex="0">iOS</li><li aria-selected="false" class="tabs__item tabItem_LNqP" role="tab" tabindex="-1">Android</li></ul><div class="margin-top--md"><div class="tabItem_Ymn6" role="tabpanel"><div class="language-plain codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-plain codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">18:26:07.024 detox[45214] i Waiting for you to manually launch your app in Xcode.</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Make sure to pass the launch arguments listed below:</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> -detoxServer ws://localhost:8099</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"> -detoxSessionId com.wix.detox-example</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain" style="display: inline-block;"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Press any key to continue...</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>You’ll need to run your app with the said arguments from Xcode:</p><p><img alt="Xcode - Edit Schema - Arguments tab" class="img_ev3q" height="505" loading="eager" src="/assets/images/edit-schema-arguments-046e78ab9badb56d7e860e6412d47ec1.png" width="897"/></p><p>Before you launch the app, make sure to <a href="/_404.html" rel="noopener noreferrer" target="_blank">put breakpoints</a> at the points of interest, e.g.:</p><p><img alt="put a breakpoint in the native code" class="img_ev3q" height="88" loading="eager" src="/assets/images/putting-a-breakpoint-d12086f5097b61ba8c10fb8caab3f574.png" width="457"/></p><p>Launch the app with the debugger attached:</p><p><img alt="launching the app" class="img_ev3q" height="882" loading="eager" src="/assets/images/launch-app-with-debugger-b16ad3d8e537e0bfe0b5e007489db914.png" width="420"/></p><p>The moment you see the app is idle, go back to the Terminal where Detox is running | |
| and press any key. If you wish to terminate the process for some reason, use Ctrl+C. | |
| In a couple of seconds you are expected to see a confirmation from Detox, e.g.:</p><div class="language-plain codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-plain codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Found the app (com.wix.detox-example) with process ID = 16854. Proceeding...</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>Now the entire test will run as usual until it sends an action to the app, which gets trapped | |
| in your breakpoint.</p><p>Happy debugging!</p></div><div class="tabItem_Ymn6" hidden="" role="tabpanel"><div class="language-plain codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-plain codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">18:26:07.024 detox[45214] i Waiting for you to manually launch your app in Android Studio.</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain" style="display: inline-block;"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Instrumentation class: com.wix.detox.test.test/com.example.DetoxTestAppJUnitRunner</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Instrumentation arguments:</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">------------------------------------</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Key | Value</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">------------------------------------</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">detoxServer | ws://localhost:8099</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">detoxSessionId | test</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">------------------------------------</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain" style="display: inline-block;"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Press any key to continue...</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>Now it is time to switch back to Android Studio. You’ll need to run your instrumentation runner with the said arguments, | |
| this is why you should create a debug configuration of <code>Android Instrumented Tests</code> type similar to the one below:</p><p><img alt="Android Debug Configuration - Android Instrumented Tests" class="img_ev3q" height="788" loading="eager" src="/assets/images/android-studio-debug-configuration-1ed2ae95a29d7c1632b0ef0df8d5f13c.png" width="1183"/></p><p>Make sure to put breakpoints at the points of interest before you start the app.</p><p>After the app is launched, go back to the Terminal where Detox is running and press any key. | |
| As a result, you are expected to see a confirmation from Detox, e.g.:</p><div class="language-plain codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-plain codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Found the app (com.wix.detox-example) with process ID = 16854. Proceeding...</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>Now the entire test will run as usual until it sends an action to the app, which gets trapped | |
| in your breakpoint.</p><p><img alt="Breakpoint is active" class="img_ev3q" height="249" loading="eager" src="/assets/images/android-happy-debugging-6d0b46e69ac6e09e311d0b6fb051f26a.png" width="530"/></p><p>Happy debugging!</p></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="troubleshooting">Troubleshooting<a aria-label="Direct link to Troubleshooting" class="hash-link" href="#troubleshooting" title="Direct link to Troubleshooting"></a></h3><div class="tabs-container tabList__CuJ"><ul aria-orientation="horizontal" class="tabs" role="tablist"><li aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active" role="tab" tabindex="0">iOS</li><li aria-selected="false" class="tabs__item tabItem_LNqP" role="tab" tabindex="-1">Android</li></ul><div class="margin-top--md"><div class="tabItem_Ymn6" role="tabpanel">There are no known issues at the moment. Check out <b>Android</b> tab if you need some.</div><div class="tabItem_Ymn6" hidden="" role="tabpanel"><p>Here are some known issues you can solve on your own:</p><ol><li><p><strong>DetoxWSClient: Retrying... At connectToServer</strong></p><div class="language-plain codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-plain codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">I/DetoxWSClient: At connectToServer</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">D/DetoxWSClient: Retrying...</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>If you see the repeatedly printed messages like above in Android application logs, it's likely | |
| that your port is not reversed. Assuming you're following the tutorial and <code>detoxServer</code> address | |
| is <code>ws://localhost:8099</code> (if not – check what Detox prints you), reverse the port on your device | |
| using ADB:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-bash codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">adb reverse tcp:8099 tcp:8099</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></li><li><p><strong>Waited for the new RN-context for too long!</strong></p><div class="language-plain codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockContent_biex"><pre class="prism-code language-plain codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">Waited for the new RN-context for too long! (60 seconds)</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain">If you think that’s not long enough, consider applying a custom Detox runtime-config in DetoxTest.runTests().</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div><p>If you see an error like above, you can patch Detox code to disable the timeout here:</p><div class="language-diff codeBlockContainer_Ckt0 theme-code-block" style="--prism-color: #F8F8F2; --prism-background-color: #282A36;"><div class="codeBlockTitle_Ktv7">detox/android/detox/src/main/java/com/wix/detox/config/DetoxConfig.kt</div><div class="codeBlockContent_biex"><pre class="prism-code language-diff codeBlock_bY9V thin-scrollbar" tabindex="0"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">package com.wix.detox.config</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line">class DetoxConfig {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> @JvmField var idlePolicyConfig: DetoxIdlePolicyConfig = DetoxIdlePolicyConfig()</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token deleted-sign deleted prefix deleted" style="color: rgb(255, 85, 85);">-</span><span class="token deleted-sign deleted line" style="color: rgb(255, 85, 85);"> @JvmField var rnContextLoadTimeoutSec = 60</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token deleted-sign deleted line" style="color: rgb(255, 85, 85);"></span><span class="token inserted-sign inserted prefix inserted" style="color: rgb(80, 250, 123);">+</span><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"> @JvmField var rnContextLoadTimeoutSec = Int.MAX_VALUE</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token inserted-sign inserted line" style="color: rgb(80, 250, 123);"></span><span class="token plain"></span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token plain"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> fun apply() {</span><br/></span><span class="token-line" style="color: rgb(248, 248, 242);"><span class="token unchanged line"></span><span class="token unchanged prefix unchanged"> </span><span class="token unchanged line"> idlePolicyConfig.apply()</span><br/></span></code></pre><div class="buttonGroup__atx"><button aria-label="Copy code to clipboard" class="clean-btn" title="Copy" type="button"><span aria-hidden="true" class="copyButtonIcons_eSgA"><svg class="copyButtonIcon_y97N" viewbox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" fill="currentColor"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewbox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" fill="currentColor"></path></svg></span></button></div></div></div></li></ol></div></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a class="theme-edit-this-page" href="/_404.html" rel="noreferrer noopener" target="_blank"><svg aria-hidden="true" class="iconEdit_Z9Sw" fill="currentColor" height="20" viewbox="0 0 40 40" width="20"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"></div></div></footer></article><nav aria-label="Docs pages" class="pagination-nav docusaurus-mt-lg"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/introduction/your-first-test"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Your First Test</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/introduction/preparing-for-ci"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Preparing for CI</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a class="table-of-contents__link toc-highlight table-of-contents__link--active" href="#running-detox-tests-step-by-step">Running Detox Tests Step-by-Step</a></li><li><a class="table-of-contents__link toc-highlight" href="#debugging-javascript-application-code">Debugging JavaScript application code</a></li><li><a class="table-of-contents__link toc-highlight" href="#debugging-native-application-code">Debugging Native application code</a><ul><li><a class="table-of-contents__link toc-highlight" href="#setting-detox-up-as-a-compiling-dependency">Setting Detox up as a compiling dependency</a></li><li><a class="table-of-contents__link toc-highlight" href="#add-a-manual-configuration-to-your-detox-config">Add a "manual" configuration to your Detox config</a></li><li><a class="table-of-contents__link toc-highlight" href="#run-a-specific-test">Run a specific test</a></li><li><a class="table-of-contents__link toc-highlight" href="#troubleshooting">Troubleshooting</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col footer__col_docs"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/introduction/getting-started">Getting Started</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/contributing">Contributing to Detox</a></li></ul></div><div class="col footer__col footer__col_support"><div class="footer__title">Support</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item footer__link-item_ask-a-question-on-stack-overflow" href="/_404.html" rel="noopener noreferrer" target="_blank">Ask a question on Stack Overflow</a></li><li class="footer__item"><a class="footer__link-item footer__link-item_create-new-issue-on-github" href="/_404.html" rel="noopener noreferrer" target="_blank">Create new issue on Github</a></li></ul></div><div class="col footer__col footer__col_more"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item footer__link-item_git-hub" href="/_404.html" rel="noopener noreferrer" target="_blank">GitHub</a></li><li class="footer__item"><a class="footer__link-item footer__link-item_twitter" href="/_404.html" rel="noopener noreferrer" target="_blank">Twitter</a></li><li class="footer__item"><a class="footer__link-item footer__link-item_discord" href="/_404.html" rel="noopener noreferrer" target="_blank">Discord</a></li></ul></div></div></div></footer></div> | |
| <script src="/assets/js/runtime~main.12cb17c3.js"></script> | |
| <script src="/assets/js/main.899efd46.js"></script> | |
| <iframe allowtransparency="true" frameborder="0" scrolling="no" src="/_cdn/platform.twitter.com/widgets/widget_iframe.1227a5674072e080ffb1ba14ac0c1079.html?origin=https%3A%2F%2Fwix.github.io" style="display: none;" title="Twitter settings iframe"></iframe><div class="c--anim" id="cc--main" style="position: fixed;"><div class="cc_div" id="cc_div"><div aria-describedby="c-txt" aria-labelledby="c-ttl" aria-modal="true" class="box bottom center zoom" id="cm" role="dialog" style="visibility: hidden;" tabindex="-1"><div id="c-inr"><div id="c-inr-i"><h2 id="c-ttl">We use cookies!</h2><div id="c-txt">This website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent.</div></div><div id="c-bns"><button class="c-bn" id="c-p-bn" type="button"><span tabindex="-1">I agree</span></button><button class="c-bn c_link" id="c-s-bn" type="button"><span tabindex="-1">Customize</span></button></div></div></div><div id="cm-ov" style="visibility: hidden; opacity: 0;"></div><div aria-hidden="true" aria-labelledby="s-ttl" aria-modal="true" class="zoom" id="s-cnt" role="dialog" style="visibility: hidden;" tabindex="-1"><div id="c-vln"><div id="cs"><div id="c-s-in"><div class="bns-t" id="s-inr"><div id="s-hdr"><h2 id="s-ttl">Cookie settings</h2><div id="s-c-bnc"><button aria-label="Close" class="c-bn" id="s-c-bn" type="button"><span tabindex="-1"></span></button></div></div><div id="s-bl"><div class="c-bl"><div class="title"><div aria-level="3" class="b-tl" role="heading">Cookie usage</div></div><div class="desc"><div class="p">We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in/out whenever you want.</div></div></div><div class="c-bl b-ex"><div class="title b-bn"><button aria-controls="c-ac-1" aria-expanded="false" class="b-tl exp" type="button">Functionality cookies</button><label class="b-tg"><input class="c-tgl" disabled="" type="checkbox" value="functionality_storage"/><span aria-hidden="true" class="c-tg c-ro"><span class="on-i"></span><span class="off-i"></span></span><span class="t-lb">Functionality cookies</span></label></div><div aria-hidden="true" class="desc b-acc" id="c-ac-1"><div class="p">These cookies are necessary for the proper functioning of our website. Without these cookies, the website might not be working properly.</div></div></div><div class="c-bl b-ex"><div class="title b-bn"><button aria-controls="c-ac-2" aria-expanded="false" class="b-tl exp" type="button">Security cookies</button><label class="b-tg"><input class="c-tgl" type="checkbox" value="security_storage"/><span aria-hidden="true" class="c-tg"><span class="on-i"></span><span class="off-i"></span></span><span class="t-lb">Security cookies</span></label></div><div aria-hidden="true" class="desc b-acc" id="c-ac-2"><div class="p">Security cookies allows storage of security-related information, such as authentication, fraud protection, and other means to protect the user.</div></div></div><div class="c-bl b-ex"><div class="title b-bn"><button aria-controls="c-ac-3" aria-expanded="false" class="b-tl exp" type="button">Personalization cookies</button><label class="b-tg"><input class="c-tgl" type="checkbox" value="personalization_storage"/><span aria-hidden="true" class="c-tg"><span class="on-i"></span><span class="off-i"></span></span><span class="t-lb">Personalization cookies</span></label></div><div aria-hidden="true" class="desc b-acc" id="c-ac-3"><div class="p">Personalisation cookies may use third party cookies to help them personalise content and track users across different websites and devices.</div></div></div><div class="c-bl b-ex"><div class="title b-bn"><button aria-controls="c-ac-4" aria-expanded="false" class="b-tl exp" type="button">Ad cookies</button><label class="b-tg"><input class="c-tgl" type="checkbox" value="ad_storage"/><span aria-hidden="true" class="c-tg"><span class="on-i"></span><span class="off-i"></span></span><span class="t-lb">Ad cookies</span></label></div><div aria-hidden="true" class="desc b-acc" id="c-ac-4"><div class="p">Advertising cookies are used by us or our partners to show you relevant content or advertisements both on our site and on third party sites. This enables us to create profiles based on your interests, so-called pseudonymised profiles. Based on this information, it is generally not possible to directly identify you as a person, as only pseudonymised data is used. Unless you express your consent, you will not receive content and advertisements tailored to your interests.</div></div></div><div class="c-bl b-ex"><div class="title b-bn"><div class="b-tl">Ad user data</div><label class="b-tg"><input class="c-tgl" type="checkbox" value="ad_user_data"/><span aria-hidden="true" class="c-tg"><span class="on-i"></span><span class="off-i"></span></span><span class="t-lb">Ad user data</span></label></div><div aria-hidden="true" class="desc b-acc" id="c-ac-5"></div></div><div class="c-bl b-ex"><div class="title b-bn"><div class="b-tl">Ad personalization</div><label class="b-tg"><input class="c-tgl" type="checkbox" value="ad_personalization"/><span aria-hidden="true" class="c-tg"><span class="on-i"></span><span class="off-i"></span></span><span class="t-lb">Ad personalization</span></label></div><div aria-hidden="true" class="desc b-acc" id="c-ac-6"></div></div><div class="c-bl b-ex"><div class="title b-bn"><button aria-controls="c-ac-7" aria-expanded="false" class="b-tl exp" type="button">Analytics cookies</button><label class="b-tg"><input class="c-tgl" type="checkbox" value="analytics_storage"/><span aria-hidden="true" class="c-tg"><span class="on-i"></span><span class="off-i"></span></span><span class="t-lb">Analytics cookies</span></label></div><div aria-hidden="true" class="desc b-acc" id="c-ac-7"><div class="p">Analytics cookies allow us to measure the performance of our website and our advertising campaigns. We use them to determine the number of visits and sources of visits to our website. We process the data obtained through these cookies in aggregate, without using identifiers that point to specific users of our website. If you disable the use of analytics cookies in relation to your visit, we lose the ability to analyse performance and optimise our measures.</div></div></div><div class="c-bl"><div class="title"><div aria-level="3" class="b-tl" role="heading">More information</div></div><div class="desc"><div class="p">For any queries in relation to our policy on cookies and your choices, please contact us.</div></div></div></div><div id="s-bns"><button class="c-bn" id="s-all-bn" type="button">Accept all</button><button class="c-bn" id="s-rall-bn" type="button">Accept necessary</button><button class="c-bn" id="s-sv-bn" type="button">Save settings</button></div></div></div></div></div></div><div id="cs-ov" style="visibility: hidden; opacity: 0;"></div></div></div><iframe allowfullscreen="true" allowtransparency="true" frameborder="0" id="rufous-sandbox" scrolling="no" style="position: absolute; visibility: hidden; display: none; width: 0px; height: 0px; padding: 0px; border-width: medium; border-style: none; border-color: currentcolor; border-image: initial;" title="Twitter analytics iframe"></iframe></body></html> |