图书目录

目    录

Chapter 1  Introduction 1

1.1  The emergence and development of software test 1

1.1.1  The emergence of software test 1

1.1.2  The first class of software test method 2

1.1.3  The second class of software test method 3

1.1.4  Understand two classes of software test method 3

1.1.5  From software test to software quality assurance 4

1.1.6  The impact of software development characteristics on software test 7

1.2  Examples of software defects and accidents 10

1.2.1  Example of software defects 10

1.2.2  Definition of software defects 11

1.2.3  Causes of defects 11

1.2.4  Software dynamic test PIE model 15

1.2.5  Cases of accidents caused by software defects 19

1.2.6  Quality awareness, social responsibility, craftsmanship spirit, and innovation 23

1.3  Meaning, principles and challenges of software test 26

1.3.1  Software quality costs 26

1.3.2  The significance of software test 27

1.3.3  The basic principles of software test 29

1.3.4  Challenges of software test 31

1.4  Software test model, process and management 32

1.4.1  Software test model 32

1.4.2  Software test process 37

1.4.3  Software test case 38

1.4.4  Software defects management 40

1.5  Software test methods and techniques 42

1.5.1  Static test and dynamic test 42

1.5.2  Black-box test and white-box test 44

1.5.3  Manual test and automated test 46

1.6  ITAI test 46

1.6.1  ITAI 46

1.6.2  ITAI architecture 47

1.6.3  Introduction of ITAI test 48

Exercise 1 50

Chapter 2  Static white-box test 54

2.1  Overview of static white-box test 54

2.2  Code review 55

2.2.1  Code check 55

2.2.2  Coding rules and programming specifications 56

2.3  Static structure analysis 60

2.4  Program flow analysis 62

2.5  Static quality measurement 64

2.6  Static white-box test example 65

2.6.1  Test procedure 65

2.6.2  Test report 66

Exercise 2 67

Chapter 3  Dynamic white-box test design 70

3.1  Logical coverage 70

3.1.1  Introduction 70

3.1.2  Statement coverage 71

3.1.3  Decision coverage 73

3.1.4  Condition coverage 74

3.1.5  Conditional/decision coverage 75

3.1.6  Condition combination coverage 77

3.1.7  Summary of coverage criteria 78

3.2  Basic path coverage 81

3.2.1  Control flow graph 81

3.2.2  Loop complexity 84

3.2.3  Basic path coverage 85

3.3  Loop test 90

3.3.1  Basic loop structure test 90

3.3.2  Compound loop structure test 92

3.4  Program mutation test 93

3.4.1  Program mutation 94

3.4.2  Mutation test 96

3.4.3  Advantages and disadvantages of mutation test 99

Exercise 3 100

Chapter 4  Dynamic white-box test practice 106

4.1  Introduction to JUnit unit test 106

4.1.1  Introduction to JUnit 106

4.1.2  Quick start 106

4.2  Logical coverage example 111

4.2.1  Source code and test requirements 111

4.2.2  Test scripts 112

4.3  Object-oriented polymorphic test example 113

4.3.1  Source code and test requirements 113

4.3.2  Test scripts 113

4.4  Example of national college students software test competition 114

4.4.1  Source code and test requirements 114

4.4.2  Test scripts 116

Exercise 4 117

Chapter 5  Black-box test design 120

5.1  Overview of black-box test 120

5.1.1  Characteristics of black-box test 120

5.1.2  Main black-box test methods 121

5.1.3  Software defects targeted by black-box test 122

5.2  Equivalence class division test 124

5.2.1  Equivalence class division 124

5.2.2  Equivalence class division test 130

5.2.3  Combination test of equivalence classes 133

5.3  Boundary value test 135

5.3.1  Boundary value 136

5.3.2  Boundary value test case design 137

5.3.3  Combination test of boundary values 138

5.4  Error guess method 141

5.4.1  Error guess 141

5.4.2  Application of error guess for mobile applications 142

5.5  Decision table driven method 143

5.5.1  Decision table 144

5.5.2  Establishment of decision table 145

5.5.3  Decision table driven test application 147

5.5.4  The conditions suitable for decision table driven test 149

5.6  Cause-effect diagram method 149

5.6.1  Introduction to cause-effect diagram 150

5.6.2  Steps for designing test cases using cause-effect diagram 152

5.6.3  Test application of cause-effect diagram method 152

5.7  Scenario method 154

5.7.1  Event flow 155

5.7.2  Scenario 156

5.7.3  Application of scenario method 158

5.8  Orthogonal experiment method 159

5.8.1  Background of orthogonal experimentation 159

5.8.2  Orthogonal experiment design method 161

5.8.3  Application steps of orthogonal experiment method 162

5.8.4  Example of application of the orthogonal experiment method 163

Exercise 5 165

Chapter 6  Black-box test practices 170

6.1  Fundamentals of automated black-box test 170

6.1.1  Script record 171

6.1.2  Script replay 172

6.2  Techniques of automated black-box test 173

6.2.1  Script optimization 173

6.2.2  Data validation points 173

6.2.3  Data-driven 175

6.2.4  Virtual user technology 175

Exercise 6 176

Chapter 7  Web test 177

7.1  Web automated test introduction 177

7.1.1  Install Java, Eclipse, and Selenium 177

7.1.2  Loading the Selenium jar in Eclipse 178

7.2  Web test practices 182

7.2.1  Basic test operations 182

7.2.2  Getting started practical case 185

7.2.3  Advanced practice example 188

Exercise 7 193

附录A  中英文对照词汇表 195

参考文献 198

软件测试实践教程(Software Test Practice Tutorial)

目录

IV

V