Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Testing and securing android studio applications

You're reading from  Testing and securing android studio applications

Product type Book
Published in Aug 2014
Publisher Packt
ISBN-13 9781783988808
Pages 162 pages
Edition 1st Edition
Languages

Tools for functional testing


In Chapter 9, Unit and Functional Tests, you learned how functional tests are performed with full connection to the system infrastructure. In this section, we will look at the different tools that allow us to easily perform functional tests in Android applications:

  • Robotium

  • Espresso

  • Appium

  • Calabash

  • MonkeyTalk

  • Bot-bot

  • Monkey

  • Wireshark

Robotium

Robotium runs on the official Android testing framework. It adds the necessary features to run through an entire Android application. It has full support for both native and hybrid applications.

Now, we will see the steps needed to run a test using Robotium on our Android application:

  1. Add the Robotium JAR to your Build Path.

  2. Create a test case using the JUnit TestCase class.

  3. Write the test case code.

  4. Run the test case.

Tests with Robotium are performed using the com.robotium.solo.Solo class available in the Robotium library.

We will now see an example of the white-box testing using Robotium. In this example, we have two EditText fields:...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}