Limit search to available items
Book Cover
E-book
Author Blundell, Paul

Title Learning Android Application Testing
Published Packt Publishing, 2015

Copies

Description 1 online resource
Contents Cover -- Copyright -- Credits -- About the Authors -- About the Reviewers -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: Getting Started with Testing -- Why, what, how, and when to test -- What to test -- Activity life cycle events -- Database and file system operations -- Physical characteristics of the device -- Types of tests -- Unit tests -- The setUp() method -- The tearDown() method -- Outside the test method -- Inside the test method -- Integration tests -- UI tests -- Functional or acceptance tests
Test case scenarioPerformance tests -- System tests -- Android Studio and other IDE support -- Java testing framework -- Android testing framework -- Instrumentation -- Gradle -- Test targets -- Creating the Android project -- Package explorer -- Creating a test case -- Test annotations -- Running the tests -- Running all tests from Android Studio -- Running a single test case from your IDE -- Running from the emulator -- Running tests from the command line -- Running all tests -- Running tests from a specific test case
Running a specific test by nameRunning specific tests by category -- Running tests using Gradle -- Debugging tests -- Other command-line options -- Summary -- Chapter 2: Understanding testing with the Android SDK -- The demonstration application -- Assertions in depth -- Custom message -- Static imports -- View assertions -- Even more assertions -- The TouchUtils class -- Mock objects -- MockContext overview -- The IsolatedContext class -- Alternate route to file and database operations -- The MockContentResolver class -- The TestCase base class
The default constructorThe given name constructor -- The setName() method -- The AndroidTestCase base class -- The assertActivityRequiresPermission() method -- Description -- Example -- The assertReadingContentUriRequiresPermission method -- Description -- Example -- The assertWritingContentUriRequiresPermission() method -- Description -- Example -- Instrumentation -- The ActivityMonitor inner class -- Example -- The InstrumentationTestCase class -- The launchActivity and launchActivityWithIntent method -- The sendKeys and sendRepeatedKeys methods
The runTestOnUiThread helper methodThe ActivityTestCase class -- The scrubClass method -- The ActivityInstrumentationTestCase2 class -- The constructor -- The setUp method -- The tearDown method -- The ProviderTestCase2 class -- The constructor -- Example -- The ServiceTestCase -- The constructor -- The TestSuiteBuilder. FailedToCreateTests class -- Using libraries in test projects -- Summary -- Chapter 3: Baking with Testing Recipes -- Android unit tests -- Testing activities and applications -- Mocking applications and preferences
Summary This book is a practical introduction to readily available techniques, frameworks, and tools to thoroughly test your Android applications and improve project development. You will learn the Java testing framework, how to create a test case and debug it. Next, you'll be walked through using the Android SDK to test using the ActivityTestCase and ActivityUnitTest classes as well as discussing popular testing libraries. Through examples you will test files, databases, ContentProviders, exceptions, services, and test your app using Espresso. You will discover how to manage your Android testing environment using Android emulators, deep dive into how adb and the emulator can super charge your testing automation, and also test user interactions with monkeyrunner. You will be guided through different testing methodologies including Test-driven Development and Behavior-driven Development and will learn how to perform Unit and Functional testing applying them to your Android projects. You will also use continuous integration techniques for ultimate application quality control using Gradle and Jenkins. By the end of the book, you'll be looking through alternative testing tactics including Fest and Spoon to build upon and expand your Android testing range and finesse
Notes English
Print version record
SUBJECT Android (Electronic resource) http://id.loc.gov/authorities/names/n2009043077
Android (Electronic resource) fast
Subject Application software -- Development.
Mobile computing.
Application software -- Development
Mobile computing
Form Electronic book
ISBN 1336281391
9781336281394
9781784397999
1784397997
1784395331
9781784395339