0

Android Espresso testing app flow

I use Espresso to test a lot of activities and transitions between them. I want to write different test for those activities and link the Activity Intents to the corresponding test cases.

1 . Activity A (testActivityA runs) 2. ActivityA launches ActivityB (testActivity B) should be called

is it possible to do this with espresso or any other test framework?

Community
  • 1
  • 1
AdityaJ
  • 59
  • 5
  • I don't know an answer to your question, but I wouldn't recommend that. Your should test each activity independently and use mocking objects. Hint Espresso allows your to start an activity. – William Kinaan Jan 30 '17 at 16:33
  • ok. Thanks for the answer. – AdityaJ Jan 30 '17 at 16:54
  • If you call other activities by pressing a button or clicking at some view, then it is possible in Espresso. You can try "Espresso Test Recorder" for creating different cases. – ivan.panasiuk Oct 13 '17 at 11:31

1 Answers1

0

You should test each activity independently of the others. If you need them to react to incoming intents, you can do that using Espresso Intents.

LukeWaggoner
  • 8,869
  • 1
  • 29
  • 28