Detox

website·Indexed 29 days ago

https://wix.github.io/Detox/

A gray-box end-to-end testing framework for mobile apps. The documentation covers environment setup, project configuration for apps and devices, and integration with test runners like Jest. It includes guides on using TypeScript, element matching, and CI preparation for versions 20.x and Next.

Tokens
147.9K
Snippets
882
Records
1.2K
Agent score
73%

What's inside Detox

  1. Overview of Detox Internals API

    The Detox Internals API allows developers to align the lifecycles of Detox with a test runner. It is primarily designed for creating advanced enterprise presets or integrating Detox with alternative test runners such as Mocha, Ava, or Vitest. Because Detox includes features like a retry mechanism for failed test files, the Detox context must persist longer than the test runner itself, requiring a communication bridge between the primary Detox process and secondary worker processes.
  2. Overview of Detox Copilot natural language testing

    Detox Copilot enables the creation of end-to-end tests using plain textual commands instead of complex scripts. It leverages Large Language Models (LLMs) to interpret natural language instructions and translate them into Detox actions and assertions, aligning with Behavior-Driven Development (BDD) principles. This approach reduces reliance on brittle selectors (like XPath or specific testIDs), lowering maintenance costs when the UI changes.
  3. Overview of Detox Copilot for natural language testing

    Detox Copilot is a feature integrated into Detox that allows developers to write end-to-end tests using plain textual commands instead of complex scripts. It leverages Large Language Models (LLMs) to translate natural language instructions into Detox actions and assertions, aligning with Behavior-Driven Development (BDD) principles. This approach reduces reliance on brittle selectors (like XPath or specific testIDs), lowering maintenance costs when the UI changes.
  4. Overview of Wix Pilot for Detox

    Wix Pilot is an AI-powered plugin for Detox (version 20.x) that enables writing end-to-end tests using natural language commands. It translates human-readable instructions into actions and assertions using Large Language Models (LLMs). Note that the copilot API is now deprecated and replaced by the pilot API.
  5. Overview of Detox Copilot natural language testing

    Detox Copilot enables the creation of end-to-end tests using plain textual commands instead of complex scripts. It leverages Large Language Models (LLMs) to interpret natural language instructions and translate them into Detox actions and assertions. This approach aligns with Behavior-Driven Development (BDD) and reduces maintenance costs by decoupling tests from brittle selectors like XPath or specific testID attributes.
  6. Overview of the Detox Artifacts System

    The Artifacts System is a subsystem responsible for collecting test artifacts such as screenshots, videos, logs, and performance data during test execution. It is orchestrated by the ArtifactsManager, which handles plugin registration, device event subscriptions, and lifecycle callbacks. It also utilizes an ArtifactPathBuilder to generate standardized paths for artifacts using the pattern: artifacts/{config}/{test}/artifact.
  7. Overview of Detox E2E Testing Benefits

    Detox is a JavaScript-based end-to-end (E2E) testing framework designed to reduce flakiness and improve developer experience. Key capabilities include:

    • Cross Platform Support: Write tests in JavaScript for both iOS and Android.
    • Automatic Synchronization: Monitors asynchronous operations within the app to prevent test flakiness.
    • Debuggability: Uses a modern async-await API, allowing breakpoints in asynchronous tests to function correctly.
    • CI Readiness: Designed for execution on CI platforms such as Travis CI, CircleCI, and Jenkins.
    • Device Testing: Supports running tests on devices and simulators to mimic real user behavior (Note: device support is currently not available for iOS).
    • Test Runner Flexibility: While it provides out-of-the-box integration with Jest, Detox is test-runner agnostic and provides APIs that can be used with any runner or independently.
  8. Overview of Detox Copilot natural language testing

    Detox Copilot enables the creation of end-to-end tests using plain textual commands instead of complex scripts. It leverages Large Language Models (LLMs) to interpret natural language instructions and translate them into Detox actions and assertions, aligning with Behavior-Driven Development (BDD) principles. This approach reduces reliance on brittle selectors (like XPath or specific testIDs), lowering maintenance costs when the UI changes.
  9. Overview of Detox E2E Testing Framework

    Detox is an open-source end-to-end (E2E) testing framework specifically designed for React Native mobile applications. It simulates real user interactions on real devices or simulators to test end-to-end flows. Unlike 'black box' testing frameworks, Detox uses a 'gray box' approach, meaning it has access to the internals of the app under test. This allows the framework to be aware of asynchronous operations (like network requests and animations), which reduces test flakiness and increases predictability.
  10. Overview of Detox Internals API

    The Detox Internals API is designed to align the lifecycles of Detox with an underlying test runner. It is particularly useful for developing advanced enterprise presets or integrating Detox with third-party test runners (e.g., Mocha, Ava, Vitest). Because Detox CLI provides features like a retry mechanism for failed test files, the Detox context must persist longer than the test runner itself. This requires a communication bridge between the primary Detox context (root process) and secondary contexts (worker processes) to manage device allocation and track test attempts.
  11. Overview of Wix Pilot for natural language testing

    Wix Pilot is an AI-powered plugin that translates human-readable natural language instructions into test actions and assertions using Large Language Models (LLMs). In the context of Detox, the pilot API serves as a facade to leverage Wix Pilot for Detox-specific testing. Note that the copilot API is deprecated and should be replaced by the pilot API.
  12. Overview of Detox E2E Testing Framework

    Detox is an open-source end-to-end (E2E) testing framework designed for React Native mobile applications. It simulates real user interactions while the app runs on a real device or simulator. Unlike 'black box' testing frameworks, Detox uses a 'gray box' approach, meaning it has access to the internals of the app under test. This allows the framework to be aware of asynchronous operations (like network requests and animations), reducing test flakiness and increasing predictability.