VoyagerXHF's picture
Upload folder using huggingface_hub (part 29)
dbe005a verified
Raw History Blame Contribute Delete
58.3 kB
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://wix.github.io/Detox/blog</id>
<title>Detox Blog</title>
<updated>2024-10-09T00:00:00.000Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<link rel="alternate" href="https://wix.github.io/Detox/blog"/>
<subtitle>Detox Blog</subtitle>
<icon>https://wix.github.io/Detox/img/favicon.ico</icon>
<entry>
<title type="html"><![CDATA[Introducing Detox Copilot]]></title>
<id>https://wix.github.io/Detox/blog/2024/10/09/detox-copilot-is-out</id>
<link href="https://wix.github.io/Detox/blog/2024/10/09/detox-copilot-is-out"/>
<updated>2024-10-09T00:00:00.000Z</updated>
<summary type="html"><![CDATA[Detox Copilot: Write Tests in Natural Language]]></summary>
<content type="html"><![CDATA[<h2 class="anchor anchorWithStickyNavbar_LWe7" id="detox-copilot-write-tests-in-natural-language">Detox Copilot: Write Tests in Natural Language<a href="#detox-copilot-write-tests-in-natural-language" class="hash-link" aria-label="Direct link to Detox Copilot: Write Tests in Natural Language" title="Direct link to Detox Copilot: Write Tests in Natural Language">​</a></h2><p>We're excited to announce <strong>Detox Copilot</strong>, a groundbreaking feature that brings natural language testing to Detox. With Detox Copilot, you can now write end-to-end tests using plain textual commands, making test creation more intuitive and accessible than ever.</p><p><img loading="lazy" alt="Detox Copilot in action GIF" src="/Detox/assets/images/copilot-demo-5c8641f24001c1d6e3effd175dc8ec2b.gif" width="600" height="388" class="img_ev3q"></p><p>Detox Copilot leverages advanced Large Language Models (LLMs) to interpret natural language instructions and translate them into Detox actions and assertions. This means you can describe your test scenarios in everyday language, aligning perfectly with <strong>Behavior-Driven Development (BDD)</strong> principles.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="why-natural-language-testing">Why Natural Language Testing?<a href="#why-natural-language-testing" class="hash-link" aria-label="Direct link to Why Natural Language Testing?" title="Direct link to Why Natural Language Testing?">​</a></h3><ul><li><strong>Improved Collaboration</strong>: Teams can collaborate more effectively, as tests are written in plain language understandable by developers, QA engineers, and non-technical stakeholders alike.</li><li><strong>Faster Test Creation</strong>: Reduce the time spent writing and maintaining complex test scripts.</li><li><strong>Enhanced Test Coverage</strong>: Lower the barrier to writing tests, encouraging more comprehensive testing.</li><li><strong>Reduced Maintenance Costs</strong>: Thanks to the decoupling from specific matchers (e.g., avoiding brittle XPath selectors or relying on <code>testID</code> attributes commonly used in React Native apps), tests are less prone to breaking when the UI changes, leading to lower maintenance overhead.</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="key-features-of-detox-copilot">Key Features of Detox Copilot<a href="#key-features-of-detox-copilot" class="hash-link" aria-label="Direct link to Key Features of Detox Copilot" title="Direct link to Key Features of Detox Copilot">​</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="write-tests-in-plain-text">Write Tests in Plain Text<a href="#write-tests-in-plain-text" class="hash-link" aria-label="Direct link to Write Tests in Plain Text" title="Direct link to Write Tests in Plain Text">​</a></h3><p>Detox Copilot allows you to write tests using natural language commands. Each step corresponds to a specific action or assertion within your app.</p><div class="language-javascript codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-javascript codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token function" style="color:rgb(80, 250, 123)">it</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'should navigate and add a product to the cart'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">async</span><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><span class="token arrow operator">=&gt;</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:#F8F8F2"><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> copilot</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">perform</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:#F8F8F2"><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'Navigate to the "Products" page'</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:#F8F8F2"><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'Tap on the "Add to Cart" button for the first product'</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:#F8F8F2"><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'Verify that the "Added to Cart" pop-up is displayed'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><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:#F8F8F2"><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 punctuation" style="color:rgb(248, 248, 242)">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="seamless-integration-with-detox">Seamless Integration with Detox<a href="#seamless-integration-with-detox" class="hash-link" aria-label="Direct link to Seamless Integration with Detox" title="Direct link to Seamless Integration with Detox">​</a></h3><p>Detox Copilot is built into Detox and requires no additional installation. Simply initialize it in your test setup, and you're ready to start writing natural language tests.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="llm-agnostic-design">LLM-Agnostic Design<a href="#llm-agnostic-design" class="hash-link" aria-label="Direct link to LLM-Agnostic Design" title="Direct link to LLM-Agnostic Design">​</a></h3><p>Detox Copilot uses LLMs to interpret instructions but is designed to be LLM-agnostic. This means you can connect it to your preferred language model service, offering flexibility and future-proofing your testing strategy.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="how-detox-copilot-works">How Detox Copilot Works<a href="#how-detox-copilot-works" class="hash-link" aria-label="Direct link to How Detox Copilot Works" title="Direct link to How Detox Copilot Works">​</a></h2><p>Once you've written your tests using natural language instructions, Detox Copilot takes care of the rest.
Here is a high-level overview of the execution flow:</p><ol><li><strong>Gather Context</strong>: Collect relevant app state, view hierarchy, and previous step results.</li><li><strong>Interpret Intent</strong>: Use the LLM to interpret the natural language instruction.</li><li><strong>Generate Code</strong>: Create the appropriate Detox commands.</li><li><strong>Execute Action</strong>: Run the generated Detox code.</li><li><strong>Cache Results</strong>: Store execution results to optimize future runs.</li><li><strong>Provide Feedback</strong>: Return values or confirm actions for subsequent steps.</li></ol><p>By combining these steps, Detox Copilot effectively bridges the gap between natural language instructions and concrete test actions.</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 fill-rule="evenodd" 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"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>Check Detox Copilot <strong><a href="https://wix-pilot.com/docs/guides/technical-overview" target="_blank" rel="noopener noreferrer">Technical Overview</a></strong> for a detailed explanation of the building blocks and the execution flow.</p></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="getting-started-with-detox-copilot">Getting Started with Detox Copilot<a href="#getting-started-with-detox-copilot" class="hash-link" aria-label="Direct link to Getting Started with Detox Copilot" title="Direct link to Getting Started with Detox Copilot">​</a></h2><p>Getting started with Detox Copilot is easy. Simply initialize Copilot in your test setup and start writing tests using natural language instructions.</p><p>Check our <a href="/Detox/docs/pilot/testing-with-pilot">Testing with Copilot guide</a> for detailed instructions on setting up and writing tests with Detox Copilot.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="extending-beyond-detox">Extending Beyond Detox<a href="#extending-beyond-detox" class="hash-link" aria-label="Direct link to Extending Beyond Detox" title="Direct link to Extending Beyond Detox">​</a></h2><p>Detox Copilot is built on a standalone core library called <a href="https://github.com/wix-incubator/pilot" target="_blank" rel="noopener noreferrer">detox-copilot</a> designed to interpret natural language testing instructions and generate test code. Though initially developed for Detox, it can be extended to work with other testing frameworks.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="learn-more">Learn More<a href="#learn-more" class="hash-link" aria-label="Direct link to Learn More" title="Direct link to Learn More">​</a></h2><p>For detailed guidance, check out our <a href="/Detox/docs/pilot/testing-with-pilot">Testing with Copilot guide</a> and the <a href="https://wix-pilot.com" target="_blank" rel="noopener noreferrer">Detox Copilot API Documentation</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="join-the-future-of-testing">Join the Future of Testing<a href="#join-the-future-of-testing" class="hash-link" aria-label="Direct link to Join the Future of Testing" title="Direct link to Join the Future of Testing">​</a></h2><p>Detox Copilot represents a major step forward in making end-to-end testing more accessible and efficient. By embracing natural language testing, you can enhance collaboration, speed up test creation, and improve overall test coverage.</p><p>We're <strong>excited</strong> to see how you'll leverage Detox Copilot in your tests! Share your experiences, feedback, and suggestions with us as we continue to refine and expand this groundbreaking feature.</p>]]></content>
<author>
<name>Asaf Korem</name>
<uri>https://github.com/asafkorem</uri>
</author>
<category label="minor-release" term="minor-release"/>
<category label="detox-pilot" term="detox-pilot"/>
<category label="ai-integration" term="ai-integration"/>
</entry>
<entry>
<title type="html"><![CDATA[Detox 20 is out]]></title>
<id>https://wix.github.io/Detox/blog/2022/11/10/detox-20-is-out</id>
<link href="https://wix.github.io/Detox/blog/2022/11/10/detox-20-is-out"/>
<updated>2022-11-10T00:00:00.000Z</updated>
<summary type="html"><![CDATA[Today we're proud to announce the new major release, Detox 20 (codename "Ashán"), which brings:]]></summary>
<content type="html"><![CDATA[<p>Today we're proud to announce the new major release, <strong>Detox 20</strong> (codename "Ashán"), which brings:</p><ul><li>official support for Genymotion SaaS</li><li>improved integration with test runners</li><li>configurable logging subsystem</li><li>headless mode for iOS via configs and CLI</li><li>reversing TCP ports via Android app configs</li><li>and more optimizations to land in the next minor versions.</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="genymotion-saas">Genymotion SaaS<a href="#genymotion-saas" class="hash-link" aria-label="Direct link to Genymotion SaaS" title="Direct link to Genymotion SaaS">​</a></h2><p><strong>Highlights</strong>: <a href="/Detox/docs/guide/genymotion-saas"><code>Using Genymotion SaaS</code></a>.</p><p>Two years ago we <a href="https://github.com/wix/Detox/pull/2446" target="_blank" rel="noopener noreferrer">added elementary support</a> for cloud-based Android emulators provided by <a href="https://cloud.geny.io" target="_blank" rel="noopener noreferrer">Genymotion SaaS</a> and started a beta testing phase across mobile projects at Wix.</p><p>Previously our mobile infrastructure engineers had been maintaining Android virtual devices on CI build agents on their own, so switching to cloud devices cleared up their time for more productive tasks. Another improvement was particularly noticeable for teams with a vast number of tests. We could reduce the duration of their CI pipelines almost by half after they scaled up from 2 parallel devices to 6<sup id="fnref-1-2b8cfe"><a href="#fn-1-2b8cfe" class="footnote-ref">1</a></sup>.</p><p>This positive impact encouraged us to adopt <a href="https://cloud.geny.io" target="_blank" rel="noopener noreferrer">Genymotion SaaS</a> for CI as quickly as possible, ignoring some unresolved issues in the initial pull request. For the most part, those were minor problems in global lifecycle management. Yet that made us feel uncertain about releasing it as-is, so we decided to take time and gain more production experience before taking any direction.</p><p>The further experience was surprisingly smooth and rarely presented issues, spare for a few minor <a href="https://github.com/wix/Detox/issues/3573" target="_blank" rel="noopener noreferrer">glitches</a> in advanced scenarios. Admittedly, revamping the <a href="/Detox/docs/api/internals">Detox lifecycle</a> took us longer than expected, which is all the more reason for us to celebrate today.</p><p>We're looking forward to providing our users with more opportunities for testing in the cloud, and this step is only the first of many to come. We hope you'll utilize this new feature to your delight.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="integration-with-test-runners">Integration with test runners<a href="#integration-with-test-runners" class="hash-link" aria-label="Direct link to Integration with test runners" title="Direct link to Integration with test runners">​</a></h2><p><strong>Highlights</strong>: <a href="/Detox/docs/config/testRunner"><code>Config file &gt; Test runner</code></a>, <a href="/Detox/docs/api/internals"><code>Internals API</code></a>, <a href="https://github.com/wix/Detox/issues/3193" target="_blank" rel="noopener noreferrer"><code>Dropping Mocha support</code></a>.</p><p>It took about a few months of work to formalize the contract between Detox and a test runner. While there's still a lot of place for improvement, the new Detox release refines their interaction and lays the groundwork for third-party integrations.</p><p><a href="https://mochajs.org" target="_blank" rel="noopener noreferrer">Mocha</a> was our first supported test runner, but unfortunately, it could not keep up with our scaling requirements as the number of end-to-end tests grew. <a href="https://github.com/mochajs/mocha/releases/tag/v8.0.0" target="_blank" rel="noopener noreferrer">By the time</a> it acquired the ability to run tests in parallel, we already had <a href="https://github.com/wix/Detox/pull/609" target="_blank" rel="noopener noreferrer">to place bets</a> on another horse, and that was <a href="https://jestjs.io" target="_blank" rel="noopener noreferrer">Jest</a>.</p><p>We attempted to keep compatibility with both Jest and Mocha, but the farther we went, the more obvious it was that we couldn't have it both ways. As it turned out, Jest wasn't easy to get along with – our first integration with it was too simplistic. Over a couple of years of use in production, we kept discovering various issues that forced us to rewrite our "glue" code from scratch twice, and this isn't over yet. All combined didn't leave much time and energy for tinkering with Mocha anymore.</p><p>In this release, we discontinued Mocha support to focus on the attunement of Jest with the new runner-independent <a href="/Detox/docs/config/testRunner">test runner config</a> and <a href="/Detox/docs/api/internals">Internals API</a>. If there's enough demand, now it is up to the open-source community to build a new integration between Detox and Mocha.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="configurable-logger">Configurable logger<a href="#configurable-logger" class="hash-link" aria-label="Direct link to Configurable logger" title="Direct link to Configurable logger">​</a></h2><p><strong>Highlights</strong>: <a href="/Detox/docs/config/logger"><code>Config file &gt; Logger</code></a>, <a href="/Detox/docs/api/logger"><code>Logger API</code></a>.</p><p>The rigidity of the logging subsystem has always been showing itself <a href="https://github.com/wix/Detox/pull/835" target="_blank" rel="noopener noreferrer">since its very creation</a> in the summer of 2019.
Due to time constraints and existing tech debts, it was impossible to do it right the first time, so we lived about three years with a proof-of-concept rather than a full-fledged feature.</p><p>The inconveniences weren't fatal but quite noticeable, nevertheless. Here are a few syndromes you could have spotted if you have ever used Detox timeline and log artifacts, especially when running tests in parallel:</p><ul><li>an uncanny file array: <code>detox_pid_7505.log</code>, <code>detox_pid_7505.log.json</code>, <code>detox_pid_7506.log</code>;</li><li>a relatively shallow <code>detox.trace.json</code>: test suites, test functions, and some user-defined segments.</li></ul><p>The good news is that the new Detox release condenses all those numerous logs into two files:</p><ul><li>the plain, human-readable <code>detox.log</code>;</li><li>the raw, machine-readable <code>detox.trace.json</code> for <code>chrome://trace</code>, <a href="https://ui.perfetto.dev/" target="_blank" rel="noopener noreferrer">Perfetto</a> and other utilities.</li></ul><p><img loading="lazy" alt="A screenshot of timeline view generated by Perfetto" src="/Detox/assets/images/v20-perfetto-example-171220190ff552d655a9a0712e2c04ed.png" width="1600" height="1000" class="img_ev3q"></p><p>With the help of the new <a href="/Detox/docs/api/logger">Logger API</a>, you can add custom duration events to the timeline, too, e.g.:</p><div class="language-js codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-js codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> detox</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">log</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">trace</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">complete</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'Login'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">async</span><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><span class="token arrow operator">=&gt;</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:#F8F8F2"><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">element</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">by</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'email'</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 punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">typeText</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'john@example.com'</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:#F8F8F2"><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">element</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">by</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'password'</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 punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">typeText</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'123456'</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:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> detox</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">log</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">info</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'Trying to log in...'</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:#F8F8F2"><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">element</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">by</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">id</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'submit'</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 punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">tap</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 punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><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 punctuation" style="color:rgb(248, 248, 242)">;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Besides, it is possible now to customize the console output of Detox via the new <a href="/Detox/docs/config/logger">logger config</a>, e.g.:</p><div class="language-js codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockTitle_Ktv7">detox.config.js</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-js codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token comment" style="color:rgb(98, 114, 164)">/** @type {Detox.DetoxConfig} */</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">module</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">exports</span><span class="token plain"> </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:#F8F8F2"><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">// ...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">logger</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">options</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">showDate</span><span class="token operator">:</span><span class="token plain"> </span><span class="token boolean">false</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">showLoggerName</span><span class="token operator">:</span><span class="token plain"> </span><span class="token boolean">false</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">showPid</span><span class="token operator">:</span><span class="token plain"> </span><span class="token boolean">false</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">prefixers</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">ph</span><span class="token operator">:</span><span class="token plain"> </span><span class="token keyword null nil" style="color:rgb(189, 147, 249);font-style:italic">null</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:#F8F8F2"><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:#F8F8F2"><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:#F8F8F2"><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:#F8F8F2"><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><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>In the example above, we minimize all the metadata around the log messages – see the screenshot below:</p><p><img loading="lazy" alt="Terser logs after applying the override" src="/Detox/assets/images/v20-logger-options-be0263e8b33e617b2a4ef55861d45e4a.png" width="1400" height="399" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="minor-features">Minor features<a href="#minor-features" class="hash-link" aria-label="Direct link to Minor features" title="Direct link to Minor features">​</a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="headless-ios">Headless iOS<a href="#headless-ios" class="hash-link" aria-label="Direct link to Headless iOS" title="Direct link to Headless iOS">​</a></h3><p>One of Detox known issues was always booting iOS simulators in a hidden mode. You could see tests running on your local simulator only if you had manually opened the Simulator app beforehand. So, we unified the <code>headless</code> property for both iOS and Android, and now both the platforms visibly boot a device unless you configure it otherwise, e.g.:</p><div class="language-js codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-js codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token comment" style="color:rgb(98, 114, 164)">/* @type {Detox.DetoxConfig} */</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">module</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">exports</span><span class="token plain"> </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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property 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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">iphone</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property 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 theme-code-block-highlighted-line" style="color:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">headless</span><span class="token operator">:</span><span class="token plain"> process</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">env</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token constant" style="color:rgb(189, 147, 249)">CI</span><span class="token plain"> </span><span class="token operator">?</span><span class="token plain"> </span><span class="token boolean">true</span><span class="token plain"> </span><span class="token operator">:</span><span class="token plain"> </span><span class="token keyword nil" style="color:rgb(189, 147, 249);font-style:italic">undefined</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property 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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">type</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'iPhone 14'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><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:#F8F8F2"><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">/* ... */</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><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:#F8F8F2"><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:#F8F8F2"><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><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>or, via CLI:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">detox </span><span class="token builtin class-name" style="color:rgb(189, 147, 249)">test</span><span class="token plain"> -c ios.sim.release --headless</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="reverse-ports">Reverse ports<a href="#reverse-ports" class="hash-link" aria-label="Direct link to Reverse ports" title="Direct link to Reverse ports">​</a></h3><p>Your apps might try to access some <code>localhost:*</code> addresses (e.g., mock servers), but this is a bit more problematic in the case of Android. The Android emulators are separate virtual devices with their own loopback network interface. In such cases, you must set up reverse port forwarding via <code>adb reverse</code>.</p><p>Local servers are quite a common prerequisite for apps in debug mode – one could recall React Native bundler on port 8081, Storybook server on 9009, etc. That's why we decided to add an optional config property for Android apps, <code>reversePorts</code>:</p><div class="language-js codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-js codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token comment" style="color:rgb(98, 114, 164)">/** @type {Detox.DetoxConfig} */</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">module</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">exports</span><span class="token plain"> </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:#F8F8F2"><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">// ...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> </span><span class="token literal-property 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:#F8F8F2"><span class="token plain"> </span><span class="token string-property 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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property 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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">binaryPath</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'...'</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:#F8F8F2"><span class="token plain"> </span><span class="token literal-property property">reversePorts</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 number">8081</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token number">3000</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:#F8F8F2"><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:#F8F8F2"><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:#F8F8F2"><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><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>In other words, this is a convenience API that tells Detox to run <code>device.reverseTcpPort(portNumber)</code> after installing the app. It should be helpful for anyone who prefers to keep such things as configs rather than as code.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="read-only-emulators-by-default">Read-only emulators by default<a href="#read-only-emulators-by-default" class="hash-link" aria-label="Direct link to Read-only emulators by default" title="Direct link to Read-only emulators by default">​</a></h3><p>The <code>-read-only</code> flag appeared in <a href="https://developer.android.com/studio/releases/emulator#concurrent-avd" target="_blank" rel="noopener noreferrer">Android emulator 28.0.16</a>. Detox promptly adopted it since the read-only mode allowed it to run multiple instances of a single Android virtual device (AVD) concurrently. This feature helped us to implement parallel test execution support for Android back then.</p><p>Being overcautious, we implemented that partially, only for cases when the user starts multiple concurrent workers. This decision created a moderately annoying UX issue. Imagine you run tests sequentially first, using one worker only. That provides you with a regular AVD instance, i.e., not a read-only one. After that, you switch to multiple workers only to get an error from the Android emulator, complaining about mixing regular and read-only instances.</p><p>While the fix itself has always been straightforward – close the running AVD and try again – this entire overcaution brought more issues than solving them. That's why, from now on, Android emulators will always be starting in <code>-read-only</code> mode unless you configure <code>readonly: false</code> in your <a href="/Detox/docs/config/devices">device config</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="reset-lock-file">Reset lock file<a href="#reset-lock-file" class="hash-link" aria-label="Direct link to Reset lock file" title="Direct link to Reset lock file">​</a></h3><p>This release adds a small CLI tool, <a href="/Detox/docs/cli/reset-lock-file"><code>detox reset-lock-file</code></a>, to help users with one specific use scenario.</p><p>Imagine you want to run tests for multiple Detox configurations at once, e.g.:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">detox </span><span class="token builtin class-name" style="color:rgb(189, 147, 249)">test</span><span class="token plain"> -c iphoneSE2020.release e2e/ui.test.js</span><br></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">detox </span><span class="token builtin class-name" style="color:rgb(189, 147, 249)">test</span><span class="token plain"> -c iphone14ProMax.release e2e/ui.test.js</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>The problem is that Detox uses a file-locking mechanism to avoid situations when parallel test workers would take control of the same device. The <code>detox test</code> command, upon start, erases that file contents, creating a race condition risk.</p><p>To eliminate that risk, use a combination of <code>detox reset-lock-file</code> and <code>--keepLockFile</code> like this:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#F8F8F2"><span class="token plain">detox reset-lock-file </span><span class="token operator">&amp;</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:#F8F8F2"><span class="token plain">detox </span><span class="token builtin class-name" style="color:rgb(189, 147, 249)">test</span><span class="token plain"> --keepLockFile -c iphoneSE2020.release e2e/ui.test.js </span><span class="token operator">&amp;</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:#F8F8F2"><span class="token plain">detox </span><span class="token builtin class-name" style="color:rgb(189, 147, 249)">test</span><span class="token plain"> --keepLockFile -c iphone14ProMax.release e2e/ui.test.js </span><span class="token operator">&amp;</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:#F8F8F2"><span class="token plain"></span><span class="token function" style="color:rgb(80, 250, 123)">wait</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" 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"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>In the future, we plan to minimize using lock files so that you don't have to think about this low-level implementation detail.
So, this tool adds some convenience until we provide a next-gen solution.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="deprecations">Deprecations<a href="#deprecations" class="hash-link" aria-label="Direct link to Deprecations" title="Direct link to Deprecations">​</a></h2><p>Detox 20 executes many pending deprecations, so make sure to check out our <a href="/Detox/docs/guide/migration#200">Migration Guide</a> before upgrading:</p><ul><li>JS: minimum supported Node.js version is <code>14.x</code>;</li><li>JS: minimum supported Jest version is <code>27.2.5</code>;</li><li>JS: Mocha test runner is no longer supported;</li><li>JS: discontinued old adapters for Jest (<code>jest-jasmine</code>, first generation of <code>jest-circus</code> adapter);</li><li>JS: discontinued <code>{ permanent: true }</code> option in <code>device.appLaunchArgs.*</code> methods (<a href="https://github.com/wix/Detox/pull/3360" target="_blank" rel="noopener noreferrer">#3360</a>);</li><li>CLI: dropped <code>-w, --workers</code> and <code>-o, --runner-config</code> args – see a <a href="/Detox/docs/guide/migration#updating-command-line-scripts">dedicated section</a> in the migration guide;</li><li>CLI: dropped deprecated <code>--device-launch-args</code> (<a href="https://github.com/wix/Detox/pull/3665" target="_blank" rel="noopener noreferrer">#3665</a>);</li><li>Config: discontinued kebab-case properties: <code>test-runner</code>, <code>runner-config</code> (<a href="https://github.com/wix/Detox/pull/3371" target="_blank" rel="noopener noreferrer">#3371</a>)</li><li>Config: discontinued <code>skipLegacyWorkersInjections</code> property (<a href="https://github.com/wix/Detox/pull/3286" target="_blank" rel="noopener noreferrer">(#3286)</a>)</li><li>Config: deprecated <code>specs</code> and <code>runnerConfig</code> properties</li><li>Config: changed <a href="/Detox/docs/config/testRunner">semantics</a> of <code>testRunner</code> property</li><li>Config: dropped support for all-in-one configurations (<a href="https://github.com/wix/Detox/pull/3386" target="_blank" rel="noopener noreferrer">#3386</a>);</li><li>Android: remove deprecated native IdlePolicyConfig (<a href="https://github.com/wix/Detox/pull/3332/files" target="_blank" rel="noopener noreferrer">#3332</a>)</li><li>iOS: discontinued <code>ios.none</code> device type – see the new way to <a href="/Detox/docs/introduction/debugging#native-application-code">debug native code</a> (<a href="https://github.com/wix/Detox/pull/3361" target="_blank" rel="noopener noreferrer">#3361</a>)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="afterword">Afterword<a href="#afterword" class="hash-link" aria-label="Direct link to Afterword" title="Direct link to Afterword">​</a></h2><p>Over the last year and a half, we have established a centralized configuration system for more than 50 projects using Detox at Wix. While it never seemed to be a cakewalk, the entire experience of troubleshooting over a hundred issues across the organization did not leave us unchanged.</p><p>We see numerous things to improve in Detox, but most of them boil down to the same thing – <strong>scaling</strong>. Surprisingly, "scaling" makes an excellent umbrella term for nearly every challenge we've been encountering lately:</p><ul><li><em>scaling up the number of users</em> requires us to improve the onboarding and troubleshooting experience;</li><li><em>scaling up the number of projects</em> forces us to centralize scattered configs into flexible organization presets;</li><li><em>scaling up the number of tests</em> prompts us to optimize the codebase and incline it towards cloud and remote execution.</li></ul><p>Our core team has been facing challenges of limited human resource constraints and growing scaling needs for a long time. In many ways, that has shaped a specific mindset within the team. We evaluate every discussed feature by asking a simple question: <em>will it save other people and us time to focus on more important things?</em> Teaching a man to fish is better than giving fish, so our success at preventing support issues matters more than our success at solving them ourselves.</p><p>That's why we'll be making subsequent efforts in these three areas, hoping to get back to you soon with even more exciting updates.</p><p>Enjoy your drive with Detox 20!</p><p>Cheers! 👋</p><div class="footnotes"><hr><ol><li id="fn-1-2b8cfe">The mentioned threshold is not a hard limit, but rather a point where the return value of scaling up the number of devices starts dramatically diminishing in our case – not only the tests themselves, but installing NPM dependencies and building the projects also takes time.<a href="#fnref-1-2b8cfe" class="footnote-backref">↩</a></li></ol></div>]]></content>
<author>
<name>Yaroslav Serhieiev</name>
<uri>https://github.com/noomorph</uri>
</author>
<category label="major-release" term="major-release"/>
<category label="genymotion" term="genymotion"/>
</entry>
</feed>