Milad Varvaei
Milad Varvaei

Reputation: 303

Test recorder for jetpack compose

I want to record a UI test in my jetpack compose project, just like record an Espresso test.

I want to follow thees steps:
  1. start recording

  2. open the application

  3. click on the objects(buttons, etc...)

  4. finish recording

  5. get generated kotlin codes just like Espresso recording

It seems we cannot use Espresso in a jetpackCompose project.

enter image description here

but in this project I didn't completely migrate to JetpackCompose still. but It recognizes it as a Jetpack Compose project

Upvotes: 10

Views: 1854

Answers (2)

shubhamgarg1
shubhamgarg1

Reputation: 2005

Currently, this is marked as expected behavior due to the limitation of Espresso with Compose.

https://issuetracker.google.com/issues/232961218

Android Studio could have made it as a warning instead of an error that would have worked for hyrbrid apps but as of now, it's an error.

Upvotes: 3

Umberto Palazzini
Umberto Palazzini

Reputation: 86

Espresso testing framework cannot be used with Jetpack Compose so test recording is not yet available but Compose tests are fairly easy to write.

You can check the official documentation if this helps: https://developer.android.com/jetpack/compose/testing

Upvotes: 1

Related Questions