Android Developers
Platform Android Studio Google Play Jetpack Kotlin Docs Games
  • English
  • Bahasa Indonesia
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Português – Brasil
  • Tiếng Việt
  • Türkçe
  • Русский
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어
  • Jetpack
  • Compose
Overview Tutorial Samples Guides For teams
Android Developers
  • Platform
  • Android Studio
  • Google Play
  • Jetpack
    • Overview
    • Tutorial
    • Samples
    • Guides
    • For teams
  • Kotlin
  • Docs
  • Games
  • Introduction
    • Documentation
    • Why Compose
    • Quick start
    • Thinking in Compose
    • Bill of Materials
      • Using the Bill of Materials
      • BOM to library version mapping
  • UI architecture
    • Lifecycle
    • Side-effects
    • Phases
    • Managing state
      • Overview
      • Where to hoist state
      • Save UI state
    • Architecture
    • Architectural layering
    • CompositionLocal
    • Navigation
  • Develop your app's layout
    • Overview
    • Layout basics
    • Modifiers
    • List of modifiers
    • Pager
    • Custom layouts
    • Build adaptive layouts
    • Alignment lines
    • Intrinsic measurements
    • ConstraintLayout
  • Components
    • Material Components and layouts
    • Lists and grids
    • Resources
  • Theming
    • Overview
    • Material Design 3
    • Migrate from Material 2 to Material 3
    • Material Design 2
    • Custom theming
    • Anatomy of a theme
    • Migrating XML themes to Compose
  • Text and typography
    • Text
  • Images and graphics
    • Overview
    • Images
      • Overview
      • Loading images
      • ImageBitmap vs ImageVector
      • Material icons
      • Customize an image
      • Custom painter
      • Optimizing performance
    • Graphics
      • Overview
      • Graphics Modifiers
      • Brush
    • Animation
      • Overview
      • Animation modifiers and composables
      • Value-based animations
      • Customize animations
      • Animated vector drawables
      • Test animations
      • Tooling
      • Advanced animation example
      • Additional resources
  • Accessibility
    • Semantics
    • Accessibility
  • Touch and input
    • Overview
    • Gestures
    • Handling interactions
  • Performance
    • Overview
    • Tooling
      • Overview
      • Layout Inspector
      • Tracing
    • Best practices
  • Best practices
    • Kotlin for Compose
    • Developer ergonomics
  • UI testing
    • Testing
    • Testing cheat sheet
  • Migrate to Compose
    • Overview
    • Migration strategy
    • Interoperability APIs
      • Overview
      • Using Compose in Views
      • Using Views in Compose
    • Other considerations
    • Adopt Compose for teams
    • Compose and other libraries
  • Tooling
    • Overview
    • Android Studio support for Compose
    • Relay designer and developer tooling
      • Overview
      • Install Relay
      • Set up your Android project
      • Basic tutorial
        • Overview
        • Create UI Package in Figma
        • Convert the designs to code in Android Studio
        • Make and propagate design updates
        • Content parameters
      • Advanced tutorial
        • Overview
        • Handling design variants
        • Content parameters
        • Add interaction handlers to designs
      • Relay workflow
        • Overview
        • Create UI Packages
        • Add parameters
        • Check errors
        • Share UI Packages
        • Android Studio workflow
        • Understand UI Package & generated code
      • Design-to-code translation details
        • Figma Component Properties
        • Children parameters
        • Nested package instances
        • Vector graphics
        • Multiple styles in text
        • Absolute positioning within auto layout
        • Fill color
        • Effects
      • Limitations & troubleshooting
      • Experimental features
        • Mapping styles to Compose theme
        • Mapping components to existing code
        • Mapping components tutorial
          • Overview
          • 1-to-1 mapping
          • Mapping with variants
      • Releases
  • Android Developers
  • Jetpack
  • Compose
  • Guides

Testing cheatsheet

The Compose testing cheat sheet is a quick reference of some of the most useful Compose test APIs. The cheat sheet is also downloadable in PDF format.

Useful Compose testing APIs

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2023-03-22 UTC.

  • WeChat WeChat
    Follow Google Developers on WeChat
  • Twitter Twitter
    Follow @AndroidDev on Twitter
  • YouTube YouTube
    Check out Android Developers on YouTube
  • More Android

    • Android
    • Enterprise
    • Security
    • Source
  • Support

    • Report platform bug
    • Report documentation bug
    • Google Play support
    • Join research studies
  • Documentation

    • Developer guides
    • Design guides
    • API reference
    • Samples
    • Android Studio
Google Developers
  • Android
  • Chrome
  • Firebase
  • Google Cloud Platform
  • All products
  • Privacy
  • License
  • Brand guidelines
  • ICP证合字B2-20070004号
  • Get news and tips by email Subscribe
  • English
  • Bahasa Indonesia
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Português – Brasil
  • Tiếng Việt
  • Türkçe
  • Русский
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어