Working with Robotium
Robotium (https://code.google.com/p/robotium/) is yet another framework that focuses on instrumentation testing, but it's more friendly for UI testing. Like we did in almost every tool we have discussed so far, you need to create a separate Maven module. Here's the corresponding Maven command line to execute inside the root folder of our application:
mvn archetype:generate \ -DarchetypeArtifactId=android-quickstart \ -DarchetypeGroupId=de.akquinet.android.archetypes \ -DarchetypeVersion=1.1.0 \ -DgroupId=com.packt.androidMaven \ -DartifactId=RobotiumTests \ -Dversion=1.0-SNAPSHOT \ -Dplatform=21 \ --batch-mode \
When you are done, double-check that the parent Maven configuration file, pom.xml
, contains the new module in the <modules>
tag. The pom.xml
file of the newly created module, RobotiumTests
, should contain the required dependencies for Robotium and the application under testing like we saw in the previous sections:
<?xml version="1.0...