Cargando…

Learning Android Application Testing.

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...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Blundell, Paul
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Packt Publishing, 2015.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • 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