This time, let's use Robotium!
Setup
If you setup the NotePad app by following my previous post or the official guide of Cloud Test Lab, then Robotium should be configured already.Otherwise, you need to configure it by yourself in advance.
Since official tutorial doesn't cover Android Studio, you can refer these helpful web pages:
- http://anirudh24seven.github.io/devlog/2015/02/13/robotium-android-studio.html
- http://www.vogella.com/tutorials/Robotium/article.html
- https://www.bloco.io/blog/2015/how-to-configure-robotium-with-android-studio
As well, if you'd like to use screenshot functions with your own app, you can find the instructions from the official guide.
Implementation
Default NotePadTest class (Espresso) is written like the following:So, just we can make new test class with Robotium!
Robotium API reference is available from here.
Edit configuration & Run! 😄
[Android Studio 2.0]
[Robotium 5.3.0]