在 Compose 中測試
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
初次編寫 Compose UI 測試。這部影片將介紹尋找器、斷言、動作和比對器,並快速瀏覽語意樹狀結構。
資源
包含此指南的集合
本指南是精選的快速指南系列之一,涵蓋更廣泛的 Android 開發目標:
Compose 基本概念 (影片集合)
本系列影片將介紹各種 Compose API,快速向您展示可用的 API 和使用方式。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Testing in Compose\n\n\u003cbr /\u003e\n\nWrite your first Compose UI test. This video covers finders, assertions,\nactions, and matchers and takes a quick look at the semantics tree. \n\nResources\n---------\n\n- [Testing your Compose layout](https://goo.gle/compose-testing)\n- [Semantics in Compose](https://goo.gle/compose-semantics)\n- [Testing cheatsheet](https://goo.gle/compose-test-sheet)\n- [Accessibility in Compose](https://goo.gle/compose-a11y)\n\nCollections that contain this guide\n-----------------------------------\n\nThis guide is part of these curated Quick Guide collections that cover\nbroader Android development goals: \n\n### Compose basics (video collection)\n\nThis series of videos introduces various Compose APIs, quickly showing you what's available and how to use them. \n[Quick guide collection](/develop/ui/compose/quick-guides/collections/compose-basics) \n\nHave questions or feedback\n--------------------------\n\nGo to our frequently asked questions page and learn about quick guides or reach out and let us know your thoughts. \n[Go to FAQ](/quick-guides/faq) [Leave feedback](https://issuetracker.google.com/issues/new?component=1573691&template=1993320)"]]