Android & Robotium - Writing automation tests?
I am using Robotium
to write automation tests.
- Should I开发者_如何学C create 1 test per activity?
- How do i deal with navigating from 1 page to another during 1 test, because when I start the next test it doesn't start my activity from scratch?
- How do you write tests for an application that uses a web service to get real data and requires authentication?
please provide as much details as possible.
Thanks
- I ended up writing 1 test per Activity.
- I was wrong about this after every test robotium start the activity from scratch.
- For application that require authentication I ended up adding numbers to my tests to make sure they run in the order I want them to.
Test1LoginActivity Test2SomeOtheractivity Test3LastActivity
This ensures that my LoginActivity gets called before anything else. This is probably not the best solution but it's the only solution I found.
精彩评论