3

I'm creating an React Native application and I want to test it with Espresso.

When I click "Record Espresso Test", I get the following error:

No suitable Android Application configuration found

Please create an Android Application configuration with a valid module and Default or Specified launch activity.

Also, I created a test manually, but the "Run" button is not available for the test.

I found this answer: How to use Espresso UI Testing for React Native? and set the accessibilityLabel for my resources, but that does not seem to have any effect.

I'm using Android Studio 2.2.3 for this

Community
  • 1
  • 1
user3673952
  • 698
  • 10
  • 30

1 Answers1

2

I found a solution:

If you import the android folder from the React Native project into Android Studio, it will behave as a regular Android project, so you will be able to record Espresso tests the usual way.

user3673952
  • 698
  • 10
  • 30
  • 3
    Are you able to actually record all the touches? The only thing being recorded in my app are the navigation clicks, but not the Touchable events, for example. – sebastianf182 Jan 24 '18 at 16:32
  • 1
    @AshleyCoolman I actually stopped trying but RN evolved quite a lot, also now when you deploy an app to Android it actually uses Firebase device farm to try out 10 devices for free. I ended up using Appium which is slow but does the work. I lacks a few things but for my use case is fine. It also takes a long time in cloud services like AWS Device Farm. 10 minutes locally vs one hour in AWS. – sebastianf182 Sep 23 '19 at 15:33