From the course: Android Compose with Kotlin

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Write advanced UI tests with Semantics

Write advanced UI tests with Semantics - Kotlin Tutorial

From the course: Android Compose with Kotlin

Write advanced UI tests with Semantics

- [Instructor] So what should you test? Most applications have layers of complexity and are comprised of many components. Then, each component may behave differently depending on the device's configuration. For example, does the app maintain the selected state of our day chips when there's a configuration change? How about the layout? Does our lazy grid correctly update when there's more width available? Can you favorite a session and have the icon update accordingly? And when a speaker doesn't have an image URL, is the speaker's initial displayed? And there's even more that we could verify. We'll move over to Android Studio and I'll walk you through how to create one of these tests. We're going to create a test for whether or not we're able to favorite a session. The biggest question when creating a new test is, how do I locate the node? And one of the best ways to figure that out is by using the Layout Inspector. Currently, I have the Layout Inspector open and it's highlighted on…

Contents