开发者

Android & Robotium - Writing automation tests?

开发者 https://www.devze.com 2023-03-15 06:20 出处:网络
I am using Robotium to write automation tests. Should I开发者_如何学C create 1 test per activity?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号