Compose Testing dùng semantics-based matcher thay vì view hierarchy. Dùng ComposeTestRule, createComposeRule(), và matcher như onNodeWithText(), onNodeWithContentDescription(). Khác Espresso tìm view theo cấu trúc, Compose testing query cây composable theo ngữ nghĩa.
Ví dụ: composeTestRule.onNodeWithText("Button").performClick(). Đáng tin cậy và nhanh hơn Espresso truyền thống.
Compose Testing uses semantics-based matchers rather than view hierarchies. Use ComposeTestRule, createComposeRule(), and matchers like onNodeWithText(), onNodeWithContentDescription(). Unlike Espresso which finds views, Compose testing queries the composable tree semantically.
Example: composeTestRule.onNodeWithText("Button").performClick(). It's more reliable and faster than traditional Espresso testing.