Android Application Testing Guide

Android Application Testing Guide pdf epub mobi txt 电子书 下载 2026

☆☆☆☆☆
出版者:Packt Publishing
作者:Diego Torres Milano
出品人:
页数:332
译者:
出版时间:2011-6-23
价格:USD 44.99
装帧:Paperback
isbn号码:9781849513500
丛书系列:
图书标签:
  • android
  • Testing
  • Android
  • 软件测试
  • 自动化
  • Test
  • 软件-测试
  • Application
  • Android
  • Testing
  • Unit Testing
  • UI Testing
  • Instrumentation Testing
  • Espresso
  • Mockito
  • Android Development
  • Mobile Testing
  • Quality Assurance
  • Debugging
想要找书就要到 图书目录大全
立刻按 ctrl+D收藏本页
你会得到大惊喜!!

具体描述

《Android Testing Essentials》深入剖析安卓应用开发中的测试实践与方法,聚焦于从初级到高级的完整测试流程。本书以实操为导向,详细介绍单元测试、UI测试、自动化测试脚本编写以及持续集成中的质量保障策略。作者基于真实项目经验,系统阐述如何在开发初期嵌入测试思维,从代码层面预防缺陷,确保应用稳定性和兼容性。书中重点解析JUnit与Espresso的结合使用,展示如何编写高效、可维护的测试用例;同时探讨模拟设备行为、网络请求拦截及多屏幕适配测试技巧,使读者掌握应对复杂场景的实用方案。通过逐步递进的案例分析,涵盖模拟输入验证、权限管理测试、资源消耗监控等关键环节,强化对安卓平台特有的行为规范和生命周期管理的理解。书中未涉及任何通用测试框架或工具介绍,而是以具体问题为驱动,深入剖析典型故障案例与修复策略,如内存泄漏检测、异步操作回调处理等。作者结合业界最佳实践,提供从手动测试到自动化脚本编写的完整路径,使读者能够构建系统化的测试方案并在真实开发环境中应用。内容严格聚焦于安卓平台的独特性与技术细节,不引入泛泛而谈,确保每一页都服务于提升实际测试能力。无论是刚起步的开发者还是希望深化测试经验的工程师,本书提供扎实的理论支撑与可复用的实践模板,助力打造高质量安卓应用。

作者简介

目录信息

Preface
Chapter 1: Getting Started with Testing
Chapter 2: Testing on Android
Chapter 3: Building Blocks on the Android SDK
Chapter 4: Test Driven Development
Chapter 5: Android Testing Environment
Chapter 6: Behavior Driven Development
Chapter 7: Testing Recipes
Chapter 8: Continuous Integration
Chapter 9: Performance Testing and Profiling
Chapter 10: Alternative Testing Tactics
Index
Preface
Chapter 1: Getting Started with Testing
Brief history
Software bugs
How bugs severely affect your projects
Why, what, how, and when to test
What to test
Activity lifecycle events
Database and filesystem operations
Physical characteristics of the device
Types of tests
Unit tests
The test fixture
The set() method
The tearDown() method
Test preconditions
The actual tests
Integration tests
Functional or acceptance tests
Test case scenario
Performance tests
System tests
Android testing framework
Instrumentation
Test targets
Summary
Chapter 2: Testing on Android
JUnit
Creating the Android main project
Creating the Android test project
Package explorer
Creating a test case
Special methods
Test annotations
Running the tests
Running all tests from Eclipse
Running a single test case from Eclipse
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 name
Running specific tests by category
Running performance tests
Dry run
Debugging tests
Other command-line options
Summary
Chapter 3: Building Blocks on the Android SDK
The demonstration application
Assertions in depth
Custom messages
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 no-argument constructor
The 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 method
The ActivityTestCase class
The scrubClass method
The ActivityInstrumentationTestCase2 class
The constructor
The set method
The tearDown method
The testPreconditions method
The ProviderTestCase2<T> class
The constructor
Example
The ServiceTestCase<T>
The constructor
The TestSuiteBuilder.FailedToCreateTests class
Using external libraries in test projects
Summary
Chapter 4: Test Driven Development
Getting started with TDD
Writing a test case
Running all tests
Refactoring the code
What is the advantage?
Understanding the requirements
Creating a sample project—the Temperature Converter
The list of requirements
User interface concept design
Creating the projects
Creating the TemperatureConverterActivityTests project
Creating the fixture
Test preconditions
Creating the user interface
Testing the existence of the user interface components
Getting the IDs defined
Translating requirements to tests
Empty fields
View properties
Screen layout
Adding functionality
Temperature conversion
The EditNumber class
TemperatureConverter unit tests
The EditNumber tests
The TemperatureChangeWatcher class
More TemperatureConverter tests
The InputFilter tests
Viewing our final application
Summary
Chapter 5: Android Testing Environment
Creating Android Virtual Devices
Running AVDs from the command line
Headless emulator
Disabling the keyguard
Cleaning up
Terminating the emulator
Additional emulator configurations
Simulating network conditions
Additional qemu options
Running monkey
Client-server monkey
Test scripting with monkeyrunner
Getting test screenshots
Record and playback
Summary
Chapter 6: Behavior Driven Development
Brief history
Given, when, then
FitNesse
Running FitNesse from the command line
Creating a TemperatureConverterTests subwiki
Adding child pages to the subwiki
Adding the acceptance test fixture
Adding the supporting test classes
GivWenZen
Creating the test scenario
Summary
Chapter 7: Testing Recipes
Android Unit tests
Testing activities and applications
Applications and preferences
The RenamingMockContext class
The TemperatureConverterApplicationTests class
Testing activities
Testing files, databases, and ContentProviders
The BrowserProvider tests
Testing exceptions
Testing local and remote services
Extensive use of mock objects
Importing libraries
The testTextChanged test
Introducing Hamcrest
Hamcrest matchers
The hasToString matcher
Testing Views in isolation
Testing parsers
Android assets
The parser activity
The parser test
Testing for memory leaks
Summary
Chapter 8: Continuous Integration
Building Android applications manually using Ant
Git—the fast version control system
Creating a local git repository
Continuous Integration with Hudson
Installing and configuring Hudson
Creating the jobs
Obtaining Android test results
Summary
Chapter 9: Performance Testing and Profiling
Ye Olde Logge method
Performance tests in Android SDK
Launching the performance test
Creating the LaunchPerformanceBase instrumentation
Creating the TemperatureConverterActivityLaunchPerformance class
Running the tests
Using the Traceview and dmtracedump platform tools
Microbenchmarks
Caliper microbenchmarks
Creating the TemperatureConverterBenchmark project
Running caliper
Summary
Chapter 10: Alternative Testing Tactics
Building Android from source
Code coverage
EMMA features
System requirements
Downloading the Android source code
Installing repo
Creating the working copy
The Building Steps
TemperatureConverter code coverage
Generating code coverage analysis report
Covering the restoring the instance state
Covering the exceptions
Bypassing access restrictions
Covering the options menu
The undocumented Ant coverage target
Introducing Robotium
Downloading Robotium
Configuring the project
Creating the test cases
The testFahrenheitToCelsiusConversion() test
The testOnCreateOptionsMenu() revisited
Testing on host's JVM
Creating the TemperatureConverterJVMTest project
Comparing the performance gain
Adding Android to the picture
Introducing Robolectric
Installing Robolectric
Creating a new Java project
Writing some tests
Summary
Index
· · · · · · (收起)

读后感

评分☆☆☆☆☆

花了一个下午粗粗的看了一遍,超级牛。 首先,这本书是目前个人见到的讲Android测试方面最全面的一本书。 不管是从广度和深度来讲都很强悍。 其次, 会给读者从不同角度思考和解决问题的方法。 最后,很多技术小细节,可以当做工具书去查询。

评分☆☆☆☆☆

花了一个下午粗粗的看了一遍,超级牛。 首先,这本书是目前个人见到的讲Android测试方面最全面的一本书。 不管是从广度和深度来讲都很强悍。 其次, 会给读者从不同角度思考和解决问题的方法。 最后,很多技术小细节,可以当做工具书去查询。

评分☆☆☆☆☆

花了一个下午粗粗的看了一遍,超级牛。 首先,这本书是目前个人见到的讲Android测试方面最全面的一本书。 不管是从广度和深度来讲都很强悍。 其次, 会给读者从不同角度思考和解决问题的方法。 最后,很多技术小细节,可以当做工具书去查询。

评分☆☆☆☆☆

花了一个下午粗粗的看了一遍,超级牛。 首先,这本书是目前个人见到的讲Android测试方面最全面的一本书。 不管是从广度和深度来讲都很强悍。 其次, 会给读者从不同角度思考和解决问题的方法。 最后,很多技术小细节,可以当做工具书去查询。

评分☆☆☆☆☆

花了一个下午粗粗的看了一遍,超级牛。 首先,这本书是目前个人见到的讲Android测试方面最全面的一本书。 不管是从广度和深度来讲都很强悍。 其次, 会给读者从不同角度思考和解决问题的方法。 最后,很多技术小细节,可以当做工具书去查询。

用户评价

评分☆☆☆☆☆

之前没学过测试,这本书至少对我这个初学者一点儿都不友好

评分☆☆☆☆☆

上一年花了半个月看完,最后一章,实在看得我这个测试门外汉流泪满面...

评分☆☆☆☆☆

基础,全面,入门的好书,值得细读

评分☆☆☆☆☆

上一年花了半个月看完,最后一章,实在看得我这个测试门外汉流泪满面...

评分☆☆☆☆☆

上一年花了半个月看完,最后一章,实在看得我这个测试门外汉流泪满面...

本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度,google,bing,sogou 等

© 2026 book.wenda123.org All Rights Reserved. 图书目录大全 版权所有