awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
callstack avatar

callstack/react-native-testing-library

0
View on GitHub↗
3,390 星标·281 分支·TypeScript·MIT·3 次浏览oss.callstack.com/react-native-testing-library↗

React Native Testing Library

This project is a testing framework designed for React Native applications, providing a suite of tools to render components in a controlled memory environment. It enables developers to verify the behavior and structure of mobile interfaces by simulating user interactions and monitoring component lifecycle transitions. By isolating components from the rest of the application, it ensures that tests remain stable and independent.

The framework distinguishes itself through an accessibility-first approach, prioritizing user-facing attributes like roles, labels, and text content when querying the component tree. This methodology ensures that tests reflect how a real user perceives and interacts with the interface, rather than relying on internal implementation details. It also includes robust support for asynchronous operations, automatically synchronizing assertions with background state updates and delayed UI rendering to prevent race conditions.

Beyond core rendering and interaction, the library provides comprehensive capabilities for validating UI state, inspecting component styles, and verifying accessibility properties. It supports testing custom hooks in isolation, managing complex component trees through provider injection, and performing structural verification via snapshots. These features allow for thorough quality assurance across various mobile interface scenarios.

Features

  • Component and Interaction Testing - Mounts components into a virtual environment to enable interaction and verification during testing.
  • React Native Testing Frameworks - Provides a specialized framework for testing mobile components by simulating user interactions and verifying rendered output through accessible, user-centric queries.
  • Scene Element Queries by Criteria - Enables retrieval of specific interface components using criteria like roles, labels, or text.
  • Asynchronous UI Test Verifications - Synchronizes test assertions with background state updates to verify application behavior in asynchronous scenarios.
  • User Interaction Simulation - Simulates user inputs like presses and gestures to verify application responsiveness to real-world behavior.
  • Component Content Validation - Check that interface elements display the correct text or accessible names to ensure that the information presented to the user matches the intended design.
  • Component Rendering Utilities - Provides utilities for mounting and rendering components in a controlled environment to facilitate testing.
  • Auto-Waiting Assertions - Pauses test execution while repeatedly checking conditions to ensure assertions account for delayed state changes.
  • Element State Assertions - Provides specialized matchers to verify element properties and accessibility status during UI state validation.
  • Asynchronous Test Handling - Synchronizes test assertions with asynchronous UI updates and state transitions.
  • React Component Testing - Implements a testing environment for mounting and verifying React-based mobile UI components in isolation.
  • Visual Assertion Validators - Asserts expectations about rendered output, including visibility and accessibility status, using specialized matchers.
  • Accessibility Query Engines - Provides an accessibility-first query engine to locate interface elements by roles and labels.
  • Asynchronous Element Waiting - Queries the component tree repeatedly until elements appear, synchronizing tests with asynchronous UI updates.
  • Test-Controlled State Updates - Forces state updates and asynchronous effects to complete before assertions run to prevent race conditions.
  • Rendered Tree Querying - Locates specific components in the rendered tree using attributes for state verification.
  • Component Snapshots - Generates JSON snapshots of component trees to facilitate structural verification.
  • User Action Intents - Locates components using user-centric intent criteria like roles and labels.
  • Component Tree Traversers - Navigates rendered component hierarchies to locate elements based on accessibility and structural properties.
  • Component Re-renderers - Supports re-rendering components with new properties to process asynchronous updates during testing.
  • Snapshot Verification Tools - Serializes rendered component trees into persistent snapshots to track and validate UI structure over time.
  • Test Isolation - Ensures test stability by mounting components into isolated, controlled memory environments.
  • Asynchronous Polling Mechanisms - Implements asynchronous polling mechanisms to synchronize test assertions with background UI updates.
  • Mobile Accessibility Auditing - Provides utilities for verifying that mobile interface elements correctly communicate their status and labels to assistive technologies.
  • Accessibility Testing Tools - Provides a testing environment that prioritizes user-facing roles and labels to ensure mobile interfaces are perceivable by assistive technologies.
  • Component Testing - Provides a library for verifying the behavior and structure of UI components through isolated testing and lifecycle management.
  • Text Rendering Stress Tests - Enforces runtime constraints by validating that text strings are correctly placed within designated containers.
  • Mobile Testing Frameworks - Offers a comprehensive testing environment for mobile applications that supports component rendering, state validation, and asynchronous event simulation.
  • Component Lifecycle Hooks - Wraps components in lifecycle hooks to monitor state transitions and side effects during testing.
  • Accessibility State Synchronization - Validates that interface elements correctly communicate their accessibility states to assistive technologies.
  • Custom Hook Testing - Enables testing of hook logic in isolation to verify state transitions and side effects without a full component tree.
  • User-Centric Verification - Enables testing mobile applications by querying elements based on how a real user perceives the interface.
  • Context Providers - Injects context providers and layout wrappers to simulate the application environment required for state management.
  • Element Wait Conditions - Monitors the component tree until elements are removed, confirming successful unmounting or hiding of UI components.
  • Scoped Queries - Allows restricting search queries to specific subtrees to isolate interactions within complex component structures.
  • Presence Verifiers - Validates the presence and existence of components within the rendered structure during tests.

Star 历史

callstack/react-native-testing-library 的 Star 历史图表callstack/react-native-testing-library 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

包含 React Native Testing Library 的精选搜索

收录 React Native Testing Library 的精选合集。
  • 用于测试网络连通性的工具

React Native Testing Library 的开源替代方案

相似的开源项目,按与 React Native Testing Library 的功能重合度排序。
  • didi/mpxdidi 的头像

    didi/mpx

    3,905在 GitHub 上查看↗

    MPX is a cross-platform framework designed to build applications for multiple mini-program ecosystems and the web from a single codebase. It utilizes a static transpilation pipeline to transform source code into platform-specific bundles, employing a single-file component system that encapsulates templates, logic, and styles. The framework provides a reactive state management system that automatically synchronizes application data with the user interface through computed properties and watchers. The project distinguishes itself through a robust build-time toolchain that supports sub-package p

    JavaScript
    在 GitHub 上查看↗3,905
  • enzymejs/enzymeE

    enzymejs/enzyme

    19,831在 GitHub 上查看↗

    Enzyme is a testing utility for React components designed to verify their output and behavior in a test environment. It serves as a test harness for UI components, providing tools to render visual elements, manage state transitions, and simulate synthetic events. The library distinguishes itself through multiple rendering modes, including a shallow rendering engine for isolated unit testing and full DOM rendering for testing deep integration. It employs an adapter-based integration system to maintain compatibility across different versions of the underlying framework. The toolkit covers a br

    JavaScript
    在 GitHub 上查看↗19,831
  • jnicklas/capybarajnicklas 的头像

    jnicklas/capybara

    10,166在 GitHub 上查看↗

    Capybara is a browser automation testing library and framework for web application acceptance testing. It provides a high-level API for automating browser navigation and element interaction to validate user-facing features. The project features a cross-browser driver interface that allows switching between headless and full browser environments without modifying the underlying test code. This abstraction enables the simulation of complex web workflows across different browser drivers and environments. The suite covers user interaction simulation, including form filling, click events, and bro

    Ruby
    在 GitHub 上查看↗10,166
  • mobile-dev-inc/maestromobile-dev-inc 的头像

    mobile-dev-inc/Maestro

    10,788在 GitHub 上查看↗

    Maestro is a declarative mobile and web UI automation framework designed for end-to-end testing. It operates by querying the native accessibility tree of an application, allowing for black-box testing without requiring source code instrumentation or platform-specific dependencies. The framework distinguishes itself through a unified command syntax that abstracts interactions across Android, iOS, and web environments. It features a dynamic synchronization engine that automatically pauses test execution to account for non-deterministic animations and network-dependent content loading, ensuring

    Kotlinandroidblackbox-testingios
    在 GitHub 上查看↗10,788
查看 React Native Testing Library 的所有 30 个替代方案→

常见问题解答

callstack/react-native-testing-library 是做什么的?

This project is a testing framework designed for React Native applications, providing a suite of tools to render components in a controlled memory environment. It enables developers to verify the behavior and structure of mobile interfaces by simulating user interactions and monitoring component lifecycle transitions. By isolating components from the rest of the application, it ensures that tests remain stable and independent.

callstack/react-native-testing-library 的主要功能有哪些?

callstack/react-native-testing-library 的主要功能包括:Component and Interaction Testing, React Native Testing Frameworks, Scene Element Queries by Criteria, Asynchronous UI Test Verifications, User Interaction Simulation, Component Content Validation, Component Rendering Utilities, Auto-Waiting Assertions。

callstack/react-native-testing-library 有哪些开源替代品?

callstack/react-native-testing-library 的开源替代品包括: didi/mpx — MPX is a cross-platform framework designed to build applications for multiple mini-program ecosystems and the web from… enzymejs/enzyme — Enzyme is a testing utility for React components designed to verify their output and behavior in a test environment.… jnicklas/capybara — Capybara is a browser automation testing library and framework for web application acceptance testing. It provides a… mobile-dev-inc/maestro — Maestro is a declarative mobile and web UI automation framework designed for end-to-end testing. It operates by… rstacruz/cheatsheets — This project is a comprehensive collection of web development reference guides and technical cheat sheets. It provides… testing-library/react-hooks-testing-library — This project is a specialized test harness and mocking utility designed for unit testing React hooks in isolation. It…