Essentials of Software Testing

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Software testing can be regarded as an art, a craft, and a science. The practical, step-by-step approach presented in this book provides a bridge between these different viewpoints. A single worked example runs throughout, with consistent use of test automation. Each testing technique is introduced in the context of this example, helping students see its strengths and weaknesses. The technique is then explained in more detail, providing a deeper understanding of underlying principles. Finally the limitations of each technique are demonstrated by inserting faults, giving learners concrete examples of when each technique succeeds or fails in finding faults. Coverage includes black-box testing, white-box testing, random testing, unit testing, object-oriented testing, and application testing. The authors also emphasise the process of applying the techniques, covering the steps of analysis, test design, test implementation, and interpretation of results. The book's web site has programming exercises and Java source code for all examples.

Author(s): RALF BIERIG, STEPHEN BROWN, EDGAR GALVÁN, JOE TIMONEY
Publisher: Cambridge University Press
Year: 2022

Language: English
Pages: 324

Cover
Half-title
Title page
Copyright information
Contents
Preface
Epigraph
Acknowledgements
1 Introduction to Software Testing
1.1 The Software Industry
1.1.1 Software Testing and Quality
1.1.2 Software Testing and Risk Management
1.2 Mistakes, Faults, and Failures
1.2.1 Mistakes
1.2.2 Software Faults
1.2.3 Software Failures
1.2.4 Need for Testing
1.3 The Role of Specifications
1.4 Manual Test Example
1.5 The Theory of Software Testing
1.6 Exhaustive Testing
1.6.1 Exhaustive Test Data
1.6.2 Feasibility of Exhaustive Testing
1.7 Test Heuristics
1.7.1 Random Testing
1.7.2 Black-Box and White-Box Testing
1.7.3 Experience-Based Testing
1.7.4 Fault Insertion
1.8 When to Finish Testing
1.9 Static and Dynamic Testing
1.9.1 Review-Based Techniques
1.9.2 Program Proving
1.10 Testing in the Software Development Process
1.11 Software Testing Activities
1.11.1 Analysis
1.11.2 Test Coverage Items
1.11.3 Test Cases
1.11.4 Test Design Verification
1.11.5 Test Implementation
1.12 Test Artefacts
1.13 Fault Models
1.14 Using this Book
1.14.1 Book Structure
1.14.2 Order of Testing
1.14.3 Documenting Test Design
1.14.4 The Programming Language
1.14.5 Level of Detail
1.14.6 Examples
1.14.7 Software Test Tools
1.15 Notes on Terminology
2 Equivalence Partitions
2.1 Testing with Equivalence Partitions
2.2 Example
2.2.1 Analysis: Identifying the Equivalence Partitions
2.2.2 Test Coverage Items
2.2.3 Test Cases
2.2.4 Verification of the Test Cases
2.3 Test Implementation and Results
2.3.1 Manual Test Output
2.3.2 Automated Test Implementation
2.3.3 Test Results
2.4 Equivalence Partitions in More Detail
2.4.1 Fault Model
2.4.2 Description
2.4.3 Analysis: Identifying Equivalence Partitions
2.4.4 Test Coverage Items
2.4.5 Test Cases
2.4.6 Pitfalls
2.5 Evaluation
2.5.1 Limitations
2.5.2 Strengths and Weaknesses
2.6 Key Points
2.7 Notes for Experienced Testers
3 Boundary Value Analysis
3.1 Testing with Boundary Value Analysis
3.2 Example
3.2.1 Analysis: Identifying the Boundary Values
3.2.2 Test Coverage Items
3.2.3 Test Cases
3.2.4 Verification of the Test Cases
3.3 Test Implementation and Results
3.3.1 Implementation
3.3.2 Test Results
3.4 Boundary Value Analysis in More Detail
3.4.1 Fault Model
3.4.2 Description
3.4.3 Analysis: Identifying Boundary Values
3.4.4 Test Coverage Items
3.4.5 Test Cases
3.4.6 Pitfalls
3.5 Evaluation
3.5.1 Limitations
3.5.2 Strengths and Weaknesses
3.6 Key Points
3.7 Notes for Experienced Testers
4 Decision Table Testing
4.1 Testing Combinations with Decision Tables
4.2 Example
4.2.1 Analysis
4.2.2 Test Coverage Items
4.2.3 Test Cases
4.2.4 Verification of the Test Cases
4.3 Test Implementation and Results
4.3.1 Implementation
4.3.2 Test Results
4.4 A More Detailed Look at Testing with Decision Tables
4.4.1 Fault Model
4.4.2 Description
4.4.3 Analysis: Developing Decision Tables
4.4.4 Test Coverage Items
4.4.5 Test Cases
4.4.6 Pitfalls
4.5 Evaluation
4.5.1 Limitations
4.5.2 Strengths and Weaknesses
4.6 Key Points
4.7 Notes for Experienced Testers
5 Statement Coverage
5.1 Introduction to White-Box Testing
5.2 Testing with Statement Coverage
5.2.1 Statement Coverage Measurement
5.3 Example
5.3.1 Analysis: Identifying Unexecuted Statements
5.3.2 Test Coverage Items
5.3.3 Test Cases
5.3.4 Verification of the Test Cases
5.4 Test Implementation and Results
5.4.1 Implementation
5.4.2 Test Results
5.5 Statement Coverage Testing in More Detail
5.5.1 Fault Model
5.5.2 Description
5.5.3 Analysis: Identifying Unexecuted Statements
5.5.4 Test Coverage Items
5.5.5 Test Cases
5.6 Evaluation
5.6.1 Limitations
5.6.2 Strengths and Weaknesses
5.7 Key Points
5.8 Notes for Experienced Testers
6 Branch Coverage
6.1 Testing with Branch Coverage
6.1.1 Branch Coverage Measurement
6.2 Example
6.2.1 Analysis: Identifying Untaken Branches
6.2.2 Test Coverage Items
6.2.3 Test Cases
6.2.4 Verification of the Test Cases
6.3 Test Implementation and Results
6.3.1 Implementation
6.3.2 Test Results
6.4 Branch Coverage in More Detail
6.4.1 Fault Model
6.4.2 Description
6.4.3 Goal
6.4.4 Analysis: Identifying Untaken Branches
6.4.5 Test Coverage Item
6.4.6 Test Cases
6.5 Evaluation
6.5.1 Limitations
6.5.2 Strengths and Weaknesses
6.6 Key Points
6.7 Notes for Experienced Testers
7 All Paths Coverage
7.1 Testing with All Paths Coverage
7.2 Example
7.2.1 Code Analysis
7.2.2 Test Coverage Items
7.2.3 Test Cases
7.2.4 Verification of the Test Cases
7.3 Test Implementation and Results
7.3.1 Implementation
7.3.2 Test Results
7.4 All Paths Coverage Testing in More Detail
7.4.1 Fault Model
7.4.2 Description
7.4.3 Analysis: Developing Control-Flow Graphs
7.4.4 Analysis: Identifying End-to-End Paths
7.4.5 The Possible Paths in Fault 6
7.4.6 Test Coverage Items
7.4.7 Test Cases
7.5 Evaluation
7.5.1 Limitations
7.5.2 Strengths and Weaknesses
7.6 Key Points
7.7 Notes for the Experienced Tester
8 Black-Box and White-Box Testing
8.1 Comparison of Black-Box and White-Box Testing
8.1.1 Black-Box Testing
8.1.2 White-Box Testing
8.1.3 Errors of Omission and Commission
8.1.4 Usage
8.2 Black-Box Testing: Additional Matters
8.2.1 Strings and Arrays
8.2.2 Discontinuous Input Partitions
8.2.3 Overlapping Output Partitions
8.2.4 In-band Error Reporting
8.2.5 Handling Relative Values
8.2.6 Classic Triangle Problem
8.2.7 Testing Sequences of Inputs/State-Based Testing
8.2.8 Floating Point Numbers
8.2.9 Numeric Processing
8.3 White-Box Testing: Some More Techniques
8.3.1 Dataflow Coverage/Definition–Use Pairs
8.3.2 Condition Coverage
8.3.3 Decision Coverage
8.3.4 Decision Condition Coverage
8.3.5 Multiple Condition Coverage
8.3.6 Modified Condition/Decision Coverage
8.3.7 Test Ranking
8.4 Repair-Based Testing
8.4.1 Specific Repair Test
8.4.2 Generic Repair Test
8.4.3 Abstracted Repair Test
8.4.4 Example
8.4.5 Using Repair-Based Tests
9 Testing Object-Oriented Software
9.1 Testing in Class Context
9.2 Example
9.2.1 Analysis
9.2.2 Deciding on Which Methods to Test
9.2.3 Selecting a Test Technique
9.2.4 Test Coverage Items
9.2.5 Test Cases
9.2.6 Verification of the Test Cases
9.3 Test Implementation and Results
9.3.1 Test Implementation
9.3.2 Test Results
9.4 A More Detailed Look at Testing Object-Oriented Software
9.4.1 Object-Oriented Programming
9.4.2 Testing Object-Oriented Software
9.4.3 Fault Models
9.4.4 Testing in Class Context
9.4.5 Analysis for OO Testing
9.4.6 Test Coverage Items
9.4.7 Test Cases
9.4.8 Test Implementation
9.4.9 Overview of Advanced OO Testing
9.4.10 Inheritance Testing
9.4.11 State-Based Testing
9.4.12 UML-Based Testing
9.4.13 Built-In Testing
9.5 Evaluation
9.5.1 Limitations
9.5.2 Simple Typo Fault
9.5.3 State-Based Fault
9.5.4 Inheritance Fault
9.5.5 Strengths and Weaknesses
9.6 Key Points
9.7 Notes for Experienced Testers
10 Application Testing
10.1 Testing Web Applications with User Stories
10.2 Example
10.2.1 Analysis
10.2.2 Test Coverage Items
10.2.3 Test Cases
10.2.4 Verification of the Test Cases
10.3 Test Implementation and Results
10.3.1 Implementation
10.3.2 Test Results
10.4 Application Testing in More Detail
10.4.1 System Test Model
10.4.2 Application Test Model
10.4.3 System Testing and Integration Testing
10.4.4 Fault Models for Application Testing
10.4.5 Analysis
10.4.6 Test Coverage Items
10.4.7 Test Cases
10.4.8 Implementation
10.4.9 Interacting with HTML Elements
10.4.10 Test Output Messages
10.4.11 Record and Playback Testing
10.5 Evaluation
10.5.1 Limitations
10.5.2 Strengths and Weaknesses
10.6 Key Points
10.7 Key Differences between Unit Testing and Application Testing
10.8 Notes for Experienced Testers
11 Test Automation
11.1 Introduction
11.1.1 Interpreting Test Results
11.1.2 Documenting Automated Tests
11.1.3 Software Test Automation and Version Control
11.2 Test Frameworks: TestNG
11.2.1 A Detailed Look at a TestNG Example
11.3 Organising Automated Test Code
11.3.1 Organising TestNG Tests with an XML File
11.4 Setup and Cleanup Methods
11.5 Inline Tests vs Parameterised Tests
11.6 Test Coverage Measurement
11.7 Timeouts
11.8 Exceptions
11.9 Inheritance Testing
11.9.1 Using the Class Name
11.9.2 Inheriting Superclass Tests
11.9.3 Inheritance Test Selection
11.10 Interfacing to Web Applications
11.11 Interfacing to Desktop Applications
11.12 Interfacing to Mobile Applications
12 Random Testing
12.1 Introduction to Random Testing
12.2 Random Data Selection
12.3 Unit Test Example
12.3.1 Test Coverage Items
12.3.2 Test Cases
12.3.3 Test Implementation
12.3.4 Test Results
12.4 Application Testing Example
12.4.1 Analysis
12.4.2 Test Coverage Items
12.4.3 Test Cases
12.4.4 Test Implementation
12.4.5 Test Results
12.5 Random Testing in More Detail
12.5.1 Barriers to Full Automation
12.5.2 Overview of Other Types of Random Testing
12.6 Evaluation
12.6.1 Limitations
12.6.2 Strengths and Weaknesses
12.7 Key Points
12.8 Notes for the Experienced Tester
13 Testing in the Software Process
13.1 Test Planning
13.2 Software Development Life Cycle
13.3 The Waterfall Model
13.4 The V-Model
13.5 Incremental and Agile Development
13.5.1 Incremental Development
13.5.2 Extreme Programming
13.5.3 Scrum
13.6 Process-Related Quality Standards and Models
14 Wrap Up
14.1 Summary
14.2 A Reverse Look at Testing
14.2.1 A Test Implementation
14.2.2 Test Cases
14.2.3 Test Coverage Items
14.2.4 Test Analysis
14.2.5 The Software Specification
14.2.6 Discussion
14.3 Further Reading
14.3.1 Testing in the Software Process
14.3.2 Standards on Software Testing
14.3.3 Software Testing Techniques
14.3.4 Testing Object-Oriented Software
14.3.5 Integration Testing
14.3.6 Random Testing
14.3.7 Testing for Language-Specific Hazards
14.3.8 Program Proving
14.3.9 Testing Safety-Critical Software
14.3.10 Going Off-Piste
14.4 Research Directions
14.4.1 Conferences
14.4.2 Research Topics
Appendix: Running the Examples
Bibliography
Listings
Index