The Android Test Automation framework, Robotium, is utilized for testing native and hybrid Android apps. It provides a straightforward API for writing UI automation scripts. While there are numerous tools meant for testing Android applications, Robotium is the most widely used testing tool for Android.
Functional, system, and user acceptance test cases can be written using Robotium. These test cases can be run on both the Android emulator and the actual Android system.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
More resources for learning => The Guide to Testing Mobile Applications for Beginners
What You Will Learn:
Starting With Robotium
Advantages Of Robotium
- Easy to write
- Simple API (All methods are present only in Solo Class)
- Automatic delays and timings
- No code writing is required to navigate between activities.
- Can test Android native apps and hybrid apps.
- Can handle several Android activities.
- Less time to write tests due to the simple API.
- Test cases are robust because of the runtime binding to UI components
- Fast test case execution.
- Easy integration with Maven and ANT.
Requirements
#1) Download and Install JAVA
- Download Java from this link.
- Add Java libraries to the PATH and set JAVA_HOME to the Java installation directory root in your environment.
#2) Download ADT Bundle
- Download the ADT bundle from this link.
- Extract the ADT bundle zip and move it into a folder.
- Set ANDROID_HOME to the root of the ADT bundle folder in your Environment.
Establishing A Robotium Project
Only a few actions are required to establish a project,
Step #1) Open Eclipse, include your Android application to be tested.
Step #2) Right-click on the Android project -> Android Tools, then click on the new Test project.
Step #3) Assign a name for the Test project and press the Next button.
Step #4) Select The Application under test as the target and press the Finish button.
Step #5) The Test project will be formed in the Eclipse workspace.
Step #6) Download Robotium solo jar from this link.
Step #7) Right-click on the Test project in the workspace, move to the Build path, and click on Configure build path.
Step #8) Switch to the libraries tab, click on the “Add External jars” option, browse the downloaded Robotium jar file, add it to the libraries and click “OK”.
Step #9) Upon successful creation of the Robotium Test project, we can now make classes under the project and start drafting the test cases.
Forming A Robotium Class
#1) Right-click on the package under the