You are previewing Pragmatic Software Testing: Becoming an Effective and Efficient Test Professional.
O'Reilly logo
Pragmatic Software Testing: Becoming an Effective and Efficient Test Professional

Book Description

A hands-on guide to testing techniques that deliver reliable software and systems


Testing even a simple system can quickly turn into a potentially infinite task. Faced with tight costs and schedules, testers need to have a toolkit of practical techniques combined with hands-on experience and the right strategies in order to complete a successful project. World-renowned testing expert Rex Black provides you with the proven methods and concepts that test professionals must know. He presents you with the fundamental techniques for testing and clearly shows you how to select and apply successful strategies to test a system with budget and time constraints.

Black begins by discussing the goals and tactics of effective and efficient testing. Next, he lays the foundation of his technique for risk-based testing, explaining how to analyze, prioritize, and document risks to the quality of the system using both informal and formal techniques. He then clearly describes how to design, develop, and, ultimately, document various kinds of tests. Because this is a hands-on activity, Black includes realistic, life-sized exercises that illustrate all of the major test techniques with detailed solutions.

By the end of this book, you'll know more about the nuts and bolts of testing than most testers learn in an entire career, and you'll be ready to put those ideas into action on your next test project.

With the help of real-world examples integrated throughout the chapters, you'll discover how to:
* Analyze the risks to system quality
* Allocate your testing effort appropriately based on the level of risk
* Choose the right testing strategies every time
* Design tests based on a system's expected behavior (black box) or internal structure (white box)
* Plan and perform integration testing
* Explore and attack the system
* Focus your hard work to serve the needs of the project

The author's companion Web site provides exercises, tips, and techniques that can be used to gain valuable experience and effectively test software and systems.

Wiley Technology Publishing Timely. Practical. Reliable.

Visit the author's Web site at http://www.rexblackconsulting.com/

Table of Contents

  1. Copyright
    1. Dedication
  2. About the Author
  3. Credits
  4. Preface
  5. Acknowledgments
  6. Introduction
    1. What Kind of Book Is This?
    2. What Topics Will I Cover?
    3. Can I Skip Topics?
    4. Can I Practice with Realistic Exercises?
    5. Does It Matter That I Have (or Haven’t) Read Another Book on Testing?
  7. I. Goals, Strategies, and Tactics
    1. 1. What Does It Mean to Be Pragmatic?
      1. What Do Effective and Efficient Mean?
      2. What Effects Do You Want?
      3. What Is the Right Level of Efficiency?
        1. Avoiding Redundancy
        2. Reducing Cost
        3. What Software Testing Isn’t...But Is Often Thought to Be
      4. Five Phases of a Tester’s Mental Life
      5. Other Founding Views on Testing
      6. Testing as a Form of Quality Risk Management
      7. So What Is the Test Team All About?
        1. What Does “Quality” Mean to You?
    2. 2. Triangle Test Exercise
      1. Exercise: The Triangle Test
      2. Your Solution for the Triangle Test
      3. Author’s Triangle Test Solution
    3. 3. Aligning Testing with the Project
      1. Why Do Organizations Test?
      2. Perspectives on Testing
      3. Testing in Context
      4. Common Test Phases and Objectives
      5. Testing Throughout the Organization
      6. The V Model
      7. Evolutionary and Incremental Models
      8. The Spiral Model
      9. Regrettably Common Model: Code and Fix
      10. Testing Maintenance Releases
      11. System Integration
      12. Hardware/Software Development
      13. The Test Process
    4. 4. Understanding Test Strategies, Tactics, and Design
      1. Aligning Mission, Strategies, and Tactics
      2. Analytical Test Strategies
      3. Model-Based Test Strategies
      4. Methodical Test Strategies
      5. Process-Oriented Test Strategies
      6. Dynamic Test Strategies
      7. Philosophical Test Strategies
      8. Regression
        1. Regression Strategy 1: Repeat All Tests
        2. Regression Strategy 2: Repeat Some Tests
      9. Three Other Regression Strategies
      10. Tactics: Categories of Testing Techniques
      11. Strategic and Tactical Considerations
      12. The Test System
      13. Classic Principles for Test Design
      14. Phases of Test Development
      15. Synopsis of Test Strategies, Tactics, and Design
  8. II. Risk-Based Testing
    1. 5. Understanding Risks to System Quality
      1. Categories of Quality Risks
        1. Functionality
        2. Performance and Reliability
        3. Stress, Capacity, and Volume
        4. States
      2. Transactions
        1. Installation and Deinstallation
        2. Operations
        3. Maintenance and Maintainability
      3. Regression
        1. Usability and User Interface
        2. Data Quality
        3. Error and Disaster Handling and Recovery
        4. Date and Time Handling
        5. Localization
        6. Configuration and Compatibility
        7. Networked, Internetworked, and Distributed
        8. Standards and Regulatory Compliance
        9. Security
        10. Timing and Coordination
        11. Documentation
      4. Can You Think of Other Quality Risks?
    2. 6. Aligning Testing with Quality Risks
      1. Prioritize Risks to System Quality
      2. Testing, Customer Usage, and System Configurations
      3. Approaches for Quality Risks Analysis
      4. Informal Quality Risk Analysis
      5. Tips for Risk Analysis
      6. Challenges of Risk Analysis
    3. 7. Quality Risk Analysis Exercise
      1. My Solution
      2. Comments on My Solution
      3. A Funny Thing Happened to Me on the Way to the Quality Risks...
      4. Bonus Exercise
      5. Template
      6. My Solution
      7. Comments on My Solution
      8. Bonus Example: Grays and Blues Quality Risk Analysis
  9. III. Static Testing
    1. 8. Reviews and Other Static Tests
      1. Testing Requirements and Designs
      2. Reviews Costs and Benefits
      3. Types of Reviews
      4. Reviews for Verification and Validation
      5. Reviews as a Way to Improve the Process, Improve the System, and Reduce Costs
      6. Answers to the Three Questions about Static Testing
      7. Reviews as a Way to Achieve Consensus and Understanding
      8. The Review Process, Roles, and Responsibilities
      9. Deliverables and Ground Rules from Reviews
      10. Common Requirements and Design Bugs
      11. Reviewing (and Testing) Documentation
      12. Other Static Tests
    2. 9. Review Exercise
      1. Reviews
      2. Your Solution
      3. My Solution
      4. Comments on My Solution
      5. Bonus Exercise: Reviewing Triangle Requirements Title Page
        1. Triangle Requirements Review Using Wiegers’s List
      6. The Requirements Bugs You Found
      7. My Solution: Requirements Bugs
      8. Comments on My Solution
  10. IV. Behavioral Testing
    1. 10. Equivalence Classes and Boundary Values
      1. Equivalence Partitioning
      2. Boundary Value Analysis
        1. Integer
        2. Real Numbers
        3. Character and String
        4. Date
        5. Time
        6. Currency
        7. Beyond Functional Classes and Boundaries
    2. 11. Equivalence Classes and Boundary Values Exercise
      1. Functional Boundaries and Classes
      2. My Solution and Comments
      3. Nonfunctional Boundaries and Classes
        1. Omninet Marketing Requirements Document (v0.3)
        2. Omninet System Requirements Document (v0.2)
    3. 12. Use Cases, Live Data, and Decision Tables
      1. Use Cases and Scenario Tests
      2. Nouns and Verbs, Adjectives and Adverbs
      3. Live Data and Customer Tests
      4. Decision Tables
    4. 13. Decision Table Exercise
      1. Decision Table Tests
      2. My Solution and Comments
      3. Decision Tables and Boundary Values
      4. My Solution and Comments
      5. Building a Decision Table for Testing
      6. My Solution and Comments
    5. 14. State Transition Diagrams
      1. Describing Systems with States Using State Transition Diagrams
      2. State Tables
      3. Printer Server State Transition Diagram
    6. 15. State Transition Diagram Exercise
      1. Kiosk States
      2. My Solution and Comments
      3. ATM State Models
      4. My Solution and Comments
      5. Grays and Blues and State Transition Diagrams
      6. My Solution and Comments
    7. 16. Domain Testing
      1. Combinatorial Explosions
      2. A Domain Example Using Frequent-Flyer Programs
      3. Possible Domain Test Values
      4. An Aerospace Example
      5. When Domain Rules Change
      6. Domain Analysis Summary
      7. Complex Domain Testing Example
      8. A General Rule for Complex Domains
    8. 17. Domain Testing Exercise
      1. My Solution and Comments
    9. 18. Orthogonal Arrays and All Pairs
      1. Combinatorial Explosions
      2. Orthogonal Arrays and All-Pairs Tables
      3. Two Orthogonal Arrays
      4. Selecting an Orthogonal Array
      5. Applying Orthogonal Arrays to a Complicated Real-World Example
      6. All-Pairs Tables
      7. Other Thoughts on Configuration Testing
    10. 19. Orthogonal Arrays Exercise
      1. My Solution and Comments
    11. 20. Reactive Testing
      1. General Facts about Reactive Tests
      2. Error Guessing, Attacks, and Bug Taxonomies
      3. Bug Hunting
      4. Exploratory Tests
      5. Checklists
      6. Other Sources of Inspiration for Reactive Testing
      7. Advantages and Disadvantages
      8. A Case Study of Exploratory Testing
  11. V. Structural Testing
    1. 21. Control-Flow Testing
      1. Code Coverage
      2. McCabe Cyclomatic Complexity
    2. 22. Control-Flow Testing Exercise
      1. My Solution and Comments
    3. 23. Data-Flow Testing
    4. 24. Data-Flow Testing Exercise
      1. My Solutions and Comments
    5. 25. Integration Testing
      1. Drivers and Stubs
      2. Integration Techniques
      3. Backbone Integration
      4. McCabe Basis Paths for Integration
      5. Enhanced Hex Converter Program
      6. Call Flow
    6. 26. Integration Basis Test Exercise
      1. My Solution and Comments
  12. VI. Appendices
    1. A. Omninet: The Internet Everywhere Marketing Requirements Document
      1. 1. Scope
        1. 1.1. Terms, Acronyms, and Abbreviations
        2. 1.2. Applicable Documents
      2. 2. Required release date
      3. 3. Description of requirements
        1. 3.1. General technical requirements
          1. 3.1.1. Welcome
          2. 3.1.2. Payment
          3. 3.1.3. Internet Browser
          4. 3.1.4. Performance
          5. 3.1.5. Localization
          6. 3.1.6. Content Control
          7. 3.1.7. Session Termination
          8. 3.1.8. Confidentiality
        2. 3.2. Administration
          1. 3.2.1. Software Updates
          2. 3.2.2. View Kiosks
          3. 3.2.3. View Users
          4. 3.2.4. Modify User
          5. 3.2.5. Terminate User
    2. B. Omninet: The Internet Everywhere System Requirements Document
      1. Functionality System Requirements
      2. Reliability System Requirements
      3. Usability System Requirements
      4. Efficiency System Requirements
      5. Maintainability System Requirements
      6. Portability System Requirements
      7. Design Models
        1. Omninet System Architecture
        2. Payment Processing Decision Table
        3. Kiosk Module Flow
        4. Kiosk State-Transition Diagram
        5. Kiosk State-Transition Table
        6. Kiosk OS/Browser/Connection Speed Configuration Orthogonal Array
    3. C. Bibliography and Other Recommended Readings
      1. RBCS Company Profile