软件测试:原理与实践(英文版)
作者 : (爱尔兰)Stephen Brown;(爱尔兰)Joe Timoney;(爱尔兰) Tom Lysaght;(中国)Deshi Ye 著
丛书名 : 经典原版书库
出版日期 : 2012-09-20
ISBN : 978-7-111-38863-0
定价 : 35.00元
教辅资源下载
扩展信息
语种 : 英文
页数 : 208
开本 : 16
原书名 : Software Testing: Principles and Practice
原出版社:
属性分类: 教材
包含CD :
绝版 :
图书简介

本书的内容基于爱尔兰国立大学梅努斯和浙江大学的一系列课程讲稿。该书覆盖了软件测试的
基本原理,可以作为许多课程的参考教材。本书的内容历经十年发展,融合了其中一位作者近二十
年的工业界经验及两位作者的教学经验。

图书特色

这本软件测试教材基于爱尔兰国立大学梅努斯和中国浙江大学的一系列课程讲稿编写而成。全书一开始简单回顾了软件产业的发展历程,进而引出接下来要讲述的本书主要内容——软件测试的基础知识、原理以及相关技术。然后,在详细阐述静态和动态软件测试原理之前给出了一些关键定义。接着,针对过程式编程和面向对象编程(使用Java语言)提供了两个完整的单元测试实例。随后,本书讨论了系统测试和软件测试自动化的方法学。在这之后,本书采用常用的软件过程来解释软件测试在软件开发生命周期中的作用。最后,作者讨论了多个测试方面的高级主题,这些开放性问题需要深入的思考和研究,更进一步的资料在研究生课程中提供。
本书主要是面向软件测试的本科课程来设计相关内容,但书中讲述的理论和技术辅以许多实际的例子来说明,这些实用的内容对于软件专业人员也很有吸引力,因为软件测试是现代软件工程项目管理的一个非常关键的要素,其重要性日渐显现,正在引起软件产业乃至IT产业的充分重视……
本书特色
凝练作者多年的行业经验和教学经验,以丰富的实例,系统阐释软件测试的基本理论和技术。
附录中给出大量与实际应用相关的练习,便于读者理解和巩固所学知识。
涵盖一些高级主题,如测试技术选择、用浮点数测试、用复杂数据结构测试、GUI组件的单元测试、嵌入式软件测试等,需要读者在接下来的学习和工作实践中不断深入研究和思考。

图书前言

本书的内容基于爱尔兰国立大学梅努斯和浙江大学的一系列课程讲稿。该书覆盖了软件测试的基本原理,可以作为许多课程的参考教材。本书的内容历经十年发展,融合了其中一位作者近二十年的工业界经验及全部作者的教学经验。
  在软件测试领域,目前还没有统一的标准教科书,而本书是通过对各种不同的软件测试技术进行多年的提炼、阐释而形成的。这些测试技术的来源包括:一些经典的测试书籍,如Myers 的《软件测试的艺术》、Roper 的《软件测试》、Binder 的《面向对象系统测试》;标准的软件工程教材,如Pressman 和Ince 的《软件工程》、Sommerville 的《软件工程》;软件过程类书籍,如Kit 的《现实世界中的软件测试》、Beck 的《极限编程》;软件质量及测试相关的ISO 和IEEE 标准。
  软件测试是一项具有挑战性的任务,它对科研机构、企业及政府具有同等的重要性。软件测试既是一门科学也是一门艺术。针对如何应用不同的软件测试技术,目前还没有广泛认同的标准,因此对各种软件测试技术的阐释是必需的。针对各种不同技术的有效性,目前还没有成熟的研究成果。总的来说,各种测试技术容易理解,但如何将其应用到软件产品中是困难的。本书旨在通过广泛丰富的实例,为读者理解和应用各种不同的软件测试技术提供一个坚实的基础。

上架指导

计算机\软件工程

封底文字

这本软件测试教材基于爱尔兰国立大学梅努斯和中国浙江大学的一系列课程讲稿编写而成。全书一开始简单回顾了软件产业的发展历程,进而引出接下来要讲述的本书主要内容——软件测试的基础知识、原理以及相关技术。然后,在详细阐述静态和动态软件测试原理之前给出了一些关键定义。接着,针对过程式编程和面向对象编程(使用Java语言)提供了两个完整的单元测试实例。随后,本书讨论了系统测试和软件测试自动化的方法学。在这之后,本书采用常用的软件过程来解释软件测试在软件开发生命周期中的作用。最后,作者讨论了多个测试方面的高级主题,这些开放性问题需要深入的思考和研究,更进一步的资料会在研究生课程中提供。
本书主要是面向软件测试的本科课程来设计相关内容,但书中讲述的理论和技术辅以许多实际的例子来说明,这些实用的内容对于软件专业人员也很有吸引力,因为软件测试是现代软件工程项目管理的一个非常关键的要素,其重要性日渐显现,正在引起软件产业乃至IT产业的充分重视……
本书特色
 凝练作者多年的行业经验和教学经验,以丰富的实例,系统阐释软件测试的基本理论和技术。
 附录中给出大量与实际应用相关的练习,便于读者理解和巩固所学知识。
 涵盖一些高级主题,如测试技术选择、用浮点数测试、用复杂数据结构测试、GUI组件的单元测试、嵌入式软件测试等,需要读者在接下来的学习和工作实践中不断深入研究和思考。

图书目录

前言
1 introduction
1.1 the software industry
1.2 software testing and quality
1.3 errors.faults and failures
1.3.1 software faults
1.3.2 software failures
1.3.3 need for testing
1.4 the role of sdecifications
1.5 overview of testing
1.5.1 testing in the development process
1.5.2 test automation
1.6 the theory of testing
1.6.1 exhaustive testing example
1.6.2 implications
1.7 when to finish testing
1.8 notes on book structure
2 principles of software testing
2.1 dynamic and static verification
2.1.1 static verification
2.1.2 dynamic verification
2.2 black-box and white.box testing
2.2.1 errors of“omission”and“mission”
2.3 test approaches
2.3.1 black-box testing
2.3.2 white-box testing
2.3.3 fault insertion
2.4 test activities
2.4.1 analysis outputs
2.4.2 test cases
2.4.3 test data
2.4.4 test code for test proceduresl
2.5 analysis of software specifications
2.5.1 parameters
2.5.2 parameter ranges
2.5.3 equivalence partitions
2.5.4 boundary values
2.5.5 binations of values
2.5.6 sequences of values
2.6 analysis of software ponents
2.6.1 control flow graphs
2.6.2 decisions and conditions
2.6.3 paths
2.6.4 data-flow testing
2.6.5 ranking
2.7 analysis of targets for fault insertion
2.7.1 offutt’s 5 sufficient mutations
2.8 test artefacts
3 unit testing
3.1 introduction
3.2 usage
3.3 black-box techniques
3.3.1 equivalence partitioning(ep)
3.3.2 boundary value analysis fbval
3.3.3 testing binations of inputs(ci)
3.3.4 testing sequences of inputs(si)or state
3.3.5 random input data fridl
3.3.6 error guessing fegl
3.4 white.box techniques
3.4.1 statement coverage fscl
3.4.2 branch coverage fbcl
3.4.3 condition coverage fccl
3.4.4 decision condition coverage fdccl
3.4.5 multiple condition coverage(mcc)
3.4.6 path coverage fpci
3.4.7 d—u pair coverage(dup)
3.5 fault insertion
3.5.1 strong mutation testing(smt)
4  Unit Testing Examples 61
4.1 Example One: seatsAvailable() . . . . . .  . . . 61 
4.1.1 Description  . . . . . . . . . . .  . . . . . . . . 61 
4.1.2 Specification  . . . . . . . . . . .  . . . . 62 
4.1.3 Source Code  . . . . . . . . . . .  . . . . 62 
4.1.4 Equivalence Partitioning . . . . . . . .  . 62 
4.1.5 Boundary Value Analysis  . . . . . . .  . . . . 65 
4.1.6 Combinational Testing . . . . . . . .  . . . . . 66 
4.1.7 Tests . . . . . . . . . . . . . .  . . . . . . 67 
4.1.8 Using Random Test Data  . . . . . . . .  68 
4.1.9 Statement Coverage  . . . . . . . . .  . . 69 
4.1.10  Branch Coverage . . . . . . . . .  . . . . . . . 70 
4.1.11  Condition Coverage  . . . . . . . .  . . . 71 
4.1.12  Decision/Condition Coverage  . . . . .  . 72 
4.1.13  Multiple Condition Coverage  . . . . .  . 73 
4.1.14  Path Coverage  . . . . . . . . . .  . . . . 74 
4.1.15  D-U pair Coverage . . . . . . . . .  . . . 75 
4.1.16  Strong Mutation Testing . . . . . . .  . . 76 
4.2 Example Two: premium() . . . . . . . . .  . . . 78 
4.2.1 Description  . . . . . . . . . . .  . . . . . . . . 78 
4.2.2 Specification  . . . . . . . . . . .  . . . . 78 
4.2.3 Source Code  . . . . . . . . . . .  . . . . 79 
4.2.4 Equivalence Partitioning . . . . . . . .  . 79 
4.2.5 Boundary Value Analysis  . . . . . . .  . . . . 80 
4.2.6 Combinational Testing . . . . . . . .  . . . . . 82 
4.2.7 Statement Coverage  . . . . . . . . .  . . 84 
4.2.8 Branch Testing . . . . . . . . . . .  . . . 85 
4.2.9 Condition Coverage  . . . . . . . . .  . . 86 
4.2.10  Multiple Condition Coverage  . . . . .  . 90 
4.2.11  Path Testing  . . . . . . . . . .  . . . . . 93 
4.2.12  d-u pair Testing  . . . . . . . .  . . . . . . . . 94 
4.2.13  Strong Mutation Testing . . . . . . .  . . 96 
5  Static Verification 98
5.1 Design Reviews . . . . . . . . . . . .  . . . . . . 98 
5.1.1 Informal Walk-through . . . . . . . . .  . 98 
5.1.2 Formal Design Review . . . . . . . . .  . 99 
5.2 Static Code Analysis . . . . . . . . . .  . . . . . 99 
5.2.1 Walk-throughs  . . . . . . . . . . .  . . . 99 
5.2.2 Code Inspections . . . . . . . . . .  . . . 100 
6  Testing Ob ject-Oriented Software 102
6.1 Characteristics Of Object-Oriented Software  .  102
6.2 Effects Of OO On Testing . . . . . . . . .  . . . 103 
6.3 Object Oriented Testing Models  . . . . . .  . . 103 
6.3.1 Conventional Models . . . . . . . . .  . . 104 
6.3.2 Combinational Models . . . . . . . . .  . 104 
6.3.3 State Machine Models  . . . . . . . .  . . . . . 104 
6.3.4 Specification & Design Models  . . . . .  . . . 104 
6.3.5 Built-In-Test  . . . . . . . . . . .  . . . . 105 
6.4 Example  . . . . . . . . .  . . 105 
6.4.1 Cla s CarTax . . . . . . . . . . .  . . . . 105 
6.4.2 Black-Box Testing in Cla s Context  . . . . . . 107 
6.4.3 White-Box Testing in Class Context  . . . . . . . . . . 108
6.4.4 Combinational Testing . . . . . . . .  . . . . . 110 
6.4.5 State-Machine Testing . . . . . . . .  . . . . . 111 
6.4.6 Specification/Design Testing  . . . . . .  113
6.4.7 Built-In Testing . . . . . . . . . . . 115 
7  Integration and System Testing. . . . .  117
7.1 Integration Testing . . . . . . . . . . . . 117 
7.1.1 Drivers and Stubs  . . . . . . . . .  . . . 117 
7.1.2 Top-Down Integration  . . . . . . . .  . . . . . 119 
7.1.3 Bo tom-Up Integration  . . . . . . .  . . . . . 120 
7.1.4 Sandwich Integration . . . . . . . . .  . . 121 
7.1.5 End-to-end User Functionality  . . . . .  121
7.1.6 Test Cases . . . . . . . .  . . . 121 
7.1.7 Conclusion  . . . . . . . . . . 122 
7.2 System Testing . . . . .  . . . . . . 122 
7.2.1 System Test Categories  . . . . . . .  . . . . . 122 
7.2.2 System Level Functional Testing  . . . . . . . . . . . 124
7.2.3 Test Cases . . . . . . . . . 126 
7.2.4 GUI Example . . . . . . . . . . . .  . . . 126 
7.3 Field Testing and Acceptance Testing  . . . .  . 131
8  Software Test Automation 132
8.1 Coverage Measurement  . . . . . . . . .  . . . . 132 
8.1.1 Lazy Evaluation  . . . . . . . . . .  . . . 133 
8.2 JUnit  . . . . . . . . . . . .  . 133 
8.2.1 JUnit Example . . . . . . . . . . .  . . . 134 
8.2.2 Test Documentation  . . . . . . . . .  . . 135 
8.3 JUnit Testing in an IDE . . . . . . . . .  . . . . 137 
8.4 Regression/Inheritance Testing With JUnit . .  . . . 137
8.5 Writing Your Own Test Runner  . . . . . .  . . 139 
8.6 Mutation Testing . . . . . . . . . . . . . . 140 
8.7 Automated System Testing  . . . . . . . .  . . . 140 
9  Testing in the Software Process 142
9.1 Test Planning . . . . . . . . . . . . 143 
9.2 Software Development Life Cycle . . . . . .  . . 144 
9.3 The Waterfa l Model . . . . . . . . . . . 144 
9.4 The V-Model . . . . . . . . . . . . 145 
9.5 Incremental and Agile Development  . . . . .  . 146 
9.5.1 Incremental Development  . . . . . . .  . . . . 147 
9.5.2 Extreme Programming . . . . . . . . .  . . . . 148 
9.5.3 SCRUM . . . . . . . . . . . . . .  . . . . 150 
9.5.4 Synch And Stabilize  . . . . . . . . .  . . 151 
9.5.5 Process-Related Quality Standards and Models . . . . . . 152
9.6 Repair-Based Testing  . . . . . . . .  . . 155 
9.6.1 Specific Repair Test  . . . . . . . . .  . . 155 
9.6.2 Generic Repair Test  . . . . . . . . .  . . 155 
9.6.3 Abstracted Repair Test  . . . . . . .  . . . . . 155 
9.6.4 Example . . . . . . . . .  . . . 156 
9.6.5 Repair-Based Test Suites  . . . . .  .  . 156 
10 Advanced Testing Issues 157
10.1  Philosophy of Testing  . .  . . . . . . 157 
10.2  Test Technique Selection  . . . . . . . . . . . 158 
10.3  Inserting Data Faults  . . . . . . . . . . 158 
10.4  Design For Testability (DFT) . . . . . .  . . . . 158 
10.5  Testing with Floating Point Numbers  . . .  . . 159 
10.6  Unit Testing of GUI Components . . . . .  . . . . . . 160 
10.7  Testing with Complex Data Structures  . .  . . . . . 161
10.8  Automated Random Testing  . . . . . .  . . . . . . . 161 
10.9  Automated Statement and Branch Testing  . .  162
10.10 Overlapping and Discontinuous Partitions . .  . 162
10.11 Handling Relative Values  . . . . . . .  . . . . . 164 
10.11.1 Cla sic Triangle Problem  . . . . . .  . . 165 
10.12 Pairwise Testing  . . . . . . .  . . 166 
10.13 Testing Boundary Cro sings (BX)  . . . .  . . . . . . 167 
10.14 Varying Input Parameters . . . . . . . .  . . . . 169 
10.15 Extended Combinational Testing . . . . .  . . . . . . 169 
10.15.1 No “Don’t-Care”s  . . . . . . . . .  . . . 169 
10.15.2 Test “Don’t-Care”s Individually  . . . .  169
10.16 Including Testing In The Build Procedure . .  . 170
10.17 Testing Concurrent and Parallel Software  . .  . 170
10.17.1 Unit Testing  . . . . . . . . . .  . . . . . 171 
10.17.2 System Testing . . . . . . . . . .  . . . . 171 
10.17.3 Static Analysis  . .  . . . . 171 
10.17.4 Tools  . . . . . . . . . . . 172 
10.18 Testing Embedded Software . . . . . . .  . . . . . . . 172 
10.19 Testing Network Protocol Processing . . . .  . . 174
10.19.1 Text-Based Protocols  . . . . . . .  . . . . . . 174 
10.19.2 Binary Protocols  . . . . . . . . .  . . . . 175 
10.19.3 Protocol Stacks and DFT  . . . . . . .  . 175 
10.20 Research Directions  . .  . . . . 175 
APPENDICES
A  Terminology . .  . . .178
B  Exercises. .  . . . 180
B.1  JUnit and Eclipse  . . . . . . . . . . 180 
B.2  Unit Test - Exercise 1  . . . . . . . . 182 
B.3  Unit Test - Exercise 2  . . . . . . . 183 
B.4  Unit Test - Exercise 3  .  . . . . . . . 184 
B.5  Unit Test - Exercise 4  . . . . . . . 185 
B.6  Unit Test - Exercise 5  . . .  . . . . . . 186 
B.7  Unit Test - Exercise 6  . . . . . . . . 187 
B.8  Unit Test - Exercise 7  . . .. . . . . . . 188 
B.9  Unit Test - Exercise 8  . . .. . . . . . 189 
B.10 Unit Test - Exercise 9  . . . . . . . . . 190 
B.11 Exercise 10 - Test Projects  .  .  . . . . . 191 
Select Bibliography 192

教学资源推荐
作者: 江颉 董天阳 王婷 编著
作者: [英]伊恩·萨默维尔(Ian Sommerville) 著
作者: (德)Christof Ebert 著
作者: Ian Sommerville
参考读物推荐
作者: Chris Raistrick, Paul Francis, John Wright, Colin Carter, Lan Wilkie
作者: (加)Scott W. Ambler, Mark Lines 著
作者: (美)汤姆·迪马可(Tom DeMarco) 蒂莫西·利斯特(Timothy Lister)著