Reputation: 535
I am writing Unit test case to test an Activity. Extending ActivityUnitTestCase class. Launching basic intent first. Then using TouchUtils, Performing intended actions. there is startActivity() call in my action. While debugging code i am able to see, the activity is started. but when in testcase using getStartedActivityIntent it returns null. What i have to do?
Upvotes: 3
Views: 452
Reputation: 17
ActivityUnitTestCase is going to be deprecated. Don't use it anymore. Refer to the following issue
Upvotes: 0
Reputation: 3803
I would advise you to use "Functional Tests" with an ActivityMonitor:
http://developer.android.com/training/activity-testing/activity-functional-testing.html
There starting an activity and verifying it works for me. With getStartedActivityIntent()
using in an ActivityUnitTestCase
also does not work for me.
Upvotes: 0