Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Application Development with Maven

You're reading from   Android Application Development with Maven Learn how to use and configure Maven to support all phases of the development of an Android application

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781783986101
Length 192 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Running Android instrumentation tests


Android uses, like we already saw, JUnit 3. It is the underlying framework to support instrumentation testing execution. All the tests you will write need to extend one of the following classes that extend the basic class ActivityTestCase:

  • ActivityInstrumentationTestCase2: This class is used for running activity tests

  • ProviderTestCase2: This class is used for running tests of content providers and making sure that your tests always run against a clean dataset

  • ServiceTestCase: This class is used for validating the various states of your services

Tip

Keep in mind also that each of the previously mentioned base test classes provide specific methods and features that facilitate the testing of their target components.

Creating a dedicated integration testing module

Our first step is to create a new dedicated Maven module that will host our instrumentation test cases. You should by now be able to create a new Maven module but for clarity we include the series...

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 $19.99/month. Cancel anytime
Banner background image