We're excited to announce Detox Copilot, 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.

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 Behavior-Driven Development (BDD) principles.
testID attributes commonly used in React Native apps), tests are less prone to breaking when the UI changes, leading to lower maintenance overhead.Detox Copilot allows you to write tests using natural language commands. Each step corresponds to a specific action or assertion within your app.
it('should navigate and add a product to the cart', async () => {
await copilot.perform(
'Navigate to the "Products" page',
'Tap on the "Add to Cart" button for the first product',
'Verify that the "Added to Cart" pop-up is displayed'
);
});
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.
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.
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:
By combining these steps, Detox Copilot effectively bridges the gap between natural language instructions and concrete test actions.
Check Detox Copilot Technical Overview for a detailed explanation of the building blocks and the execution flow.
Getting started with Detox Copilot is easy. Simply initialize Copilot in your test setup and start writing tests using natural language instructions.
Check our Testing with Copilot guide for detailed instructions on setting up and writing tests with Detox Copilot.
Detox Copilot is built on a standalone core library called detox-copilot 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.
For detailed guidance, check out our Testing with Copilot guide and the Detox Copilot API Documentation.
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.
We're excited 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.
]]>Highlights: Using Genymotion SaaS.
Two years ago we added elementary support for cloud-based Android emulators provided by Genymotion SaaS and started a beta testing phase across mobile projects at Wix.
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 61.
This positive impact encouraged us to adopt Genymotion SaaS 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.
The further experience was surprisingly smooth and rarely presented issues, spare for a few minor glitches in advanced scenarios. Admittedly, revamping the Detox lifecycle took us longer than expected, which is all the more reason for us to celebrate today.
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.
Highlights: Config file > Test runner, Internals API, Dropping Mocha support.
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.
Mocha 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. By the time it acquired the ability to run tests in parallel, we already had to place bets on another horse, and that was Jest.
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.
In this release, we discontinued Mocha support to focus on the attunement of Jest with the new runner-independent test runner config and Internals API. If there's enough demand, now it is up to the open-source community to build a new integration between Detox and Mocha.
Highlights: Config file > Logger, Logger API.
The rigidity of the logging subsystem has always been showing itself since its very creation 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.
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:
detox_pid_7505.log, detox_pid_7505.log.json, detox_pid_7506.log;detox.trace.json: test suites, test functions, and some user-defined segments.The good news is that the new Detox release condenses all those numerous logs into two files:
detox.log;detox.trace.json for chrome://trace, Perfetto and other utilities.
With the help of the new Logger API, you can add custom duration events to the timeline, too, e.g.:
await detox.log.trace.complete('Login', async () => {
await element(by.id('email')).typeText('john@example.com');
await element(by.id('password')).typeText('123456');
detox.log.info('Trying to log in...');
await element(by.id('submit')).tap();
});
Besides, it is possible now to customize the console output of Detox via the new logger config, e.g.:
/** @type {Detox.DetoxConfig} */
module.exports = {
// ...
logger: {
options: {
showDate: false,
showLoggerName: false,
showPid: false,
prefixers: {
ph: null,
},
},
},
};
In the example above, we minimize all the metadata around the log messages – see the screenshot below:

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 headless property for both iOS and Android, and now both the platforms visibly boot a device unless you configure it otherwise, e.g.:
/* @type {Detox.DetoxConfig} */
module.exports = {
devices: {
iphone: {
type: 'ios.simulator',
headless: process.env.CI ? true : undefined,
device: {
type: 'iPhone 14'
},
/* ... */
}
},
};
or, via CLI:
detox test -c ios.sim.release --headless
Your apps might try to access some localhost:* 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 adb reverse.
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, reversePorts:
/** @type {Detox.DetoxConfig} */
module.exports = {
// ...
apps: {
'android.debug': {
type: 'android.apk',
binaryPath: '...',
reversePorts: [8081, 3000],
},
},
};
In other words, this is a convenience API that tells Detox to run device.reverseTcpPort(portNumber) after installing the app. It should be helpful for anyone who prefers to keep such things as configs rather than as code.
The -read-only flag appeared in Android emulator 28.0.16. 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.
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.
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 -read-only mode unless you configure readonly: false in your device config.
This release adds a small CLI tool, detox reset-lock-file, to help users with one specific use scenario.
Imagine you want to run tests for multiple Detox configurations at once, e.g.:
detox test -c iphoneSE2020.release e2e/ui.test.js
detox test -c iphone14ProMax.release e2e/ui.test.js
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 detox test command, upon start, erases that file contents, creating a race condition risk.
To eliminate that risk, use a combination of detox reset-lock-file and --keepLockFile like this:
detox reset-lock-file & \
detox test --keepLockFile -c iphoneSE2020.release e2e/ui.test.js & \
detox test --keepLockFile -c iphone14ProMax.release e2e/ui.test.js & \
wait
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.
Detox 20 executes many pending deprecations, so make sure to check out our Migration Guide before upgrading:
14.x;27.2.5;jest-jasmine, first generation of jest-circus adapter);{ permanent: true } option in device.appLaunchArgs.* methods (#3360);-w, --workers and -o, --runner-config args – see a dedicated section in the migration guide;--device-launch-args (#3665);test-runner, runner-config (#3371)skipLegacyWorkersInjections property ((#3286))specs and runnerConfig propertiestestRunner propertyios.none device type – see the new way to debug native code (#3361)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.
We see numerous things to improve in Detox, but most of them boil down to the same thing – scaling. Surprisingly, "scaling" makes an excellent umbrella term for nearly every challenge we've been encountering lately:
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: will it save other people and us time to focus on more important things? 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.
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.
Enjoy your drive with Detox 20!
Cheers! 👋