简体   繁体   中英

How to use Espresso Test Recorder in React Native

I have been struggling to get this to work. I am choosing Espresso as a framework to test because I see there is support in Xamarin Test Cloud, Firebase and Amazon Device Farm which makes it easier to port the tests.

Also, I like the fact that you can just record a test with Android Studio. The problem is that my clicks are not being catched. Only the ones that I made on the Back button.

It seems all the Touchable views in RN are being ignored. I understand RN creates Views in a different way, and also there is no resourceId.

i had the same error, for some reason Espresso does not support full Test Recorder clicks, you can do a few with the recorder but you will need to do some manually as this video says

https://youtu.be/JRkDVvB106k?t=2m4s

as the documentation says

espresso-core - Contains core and basic View matchers, actions, and assertions. See Basics and Recipes.

https://developer.android.com/training/testing/espresso/index.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM