0

I'm new to Espresso in Android Studio. The app I'm testing sends information to a REST service which creates and sends back an ID number. In another piece of the app I can request that ID number and get its information back. I want to store the ID returned when created and insert it into the requester to verify it is created. I've found some Espresso methods which can get a string from a view, but it warns that that is dangerous and likely not the best way to do that. how to get text from textview using espresso

Can someone explain the best way to accomplish this task if getting a string is not a good idea? Or, is that the only way to do it?

Ray Rudd
  • 21
  • 1

1 Answers1

0

The question is if a instrumentation test is really what you want to do in your case. If something is testable in a easy way depends on your architecture. Large integration tests tend to break often as they hold many dependencies - consider to write unit tests first and https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html is also a good read regarding that topic.

user1892364
  • 259
  • 2
  • 12