面向对象系统测试模型视图与工具

面向对象系统测试模型视图与工具
作 者: 宾德
出版社: 科学出版社
丛编项: UML与面向对象设计影印丛书
版权说明: 本书为出版图书,暂不支持在线阅读,请支持正版图书
标 签: UML
ISBN 出版时间 包装 开本 页数 字数
未知 暂无 暂无 未知 0 暂无

作者简介

暂缺《面向对象系统测试模型视图与工具》作者简介

内容简介

要实现高质量、高稳定性的面向对象软件系统,有效的测试技术是必不可少的。本书深入讲述了如何用状态机、组合逻辑和UML开发可测试的模型。通过对多种模式的介绍,可以让读者掌握如何设计测试套件、如何针对OO代码修改测试方法、如何测试可重用组件及框架,以及如何根据用况开发高效的测试套件。书中还提供了许多实际测试经验和面向对象测试领域的最新研究成果。与面向对象系统稳定性有关的开发及测试人员,皆可阅读此书。

图书目录

List of Figures

List of Tables

List of Procedures

Foreword

Preface

Acknowledgments

Part I Preliminaries

Chapter 1 A Small Challenge

Chapter 2 How to Use This Book

2.1 Reader Guidance

2.2 conventions

2.2.1 Chapter Elements

2.2.2 Degree of difficulty

2.2.3 Standards

2.2.4 Object-oriented Terminology

2.2.5 Programming Languages and Code Examples

2.2.6 Testing Tools

2.2.7 Humility Department,or Bug Reports Cheerfully Accepted

2.3 FAQs for Object-oriented Testing

2.3.1 Why Test Objects?

2.3.2 Test Design

2.3.3 Test Design for Methods and Classes

2.3.4 Testing for Reuse

2.3.5 Test Design for subsystems and Application Systems

2.3.6 Integration Testing and Order of Development

2.3.7 Regression Testing and Iterative,Incremental Development

2.3.8 Testing with UML Models

2.3.9 Test Automation

2.4 Test Process

Chapter 3 Testing:A Brief Introduction

3.1 What Is Software Testing?

3.2 Definitions

3.3 The Limits of Testing

3.3.1 The Input/State Space

3.3.2 Execution Squences

3.3.3 Fault Sensitivity and Coincidental Correctness

3.3.4 Absolute Limitations

3.4 What Can Testing Accomplish?

3.5 Bibliographic Notes

Chapter 4 With the Necessary Changes:Testing and Object-oriented Software

4.1 The Dismal science of Software Testing

4.1.1 I'm Okay,You're Okay,Objecrts Are Okay

4.1.2 The Role of a Fault Model

4.1.3 Fault Models for Object-oriented Programming

4.2 Side Effects of the Paradigm

4.2.1 What Goes Wrong?

4.2.2 Encapsulation

4.2.3 Inheritance

Incorrect Initialization and Forgotten Methods

Testing Axioms

Inheritance Structure

Multiple Inheritance

Abstract and Generic Classes

4.2.4 Polymorphism

Dynamic Binding

The Yo-Yo Problem

4.2.5 Message Sequence and State-related Bugs

Message Sequence Model

Equivalent Sequences

Implications of Cooperative Design

Observability of State Faults

Nonspecific State Faults

4.2.6 Built-in Low-level Services

4.2.7 Bug Lists

4.3 Language-specific Hazards

4.3.1 C++

4.3.2 Java

4.3.3 Smalltalk

4.4 Coverage Models for Object-oriented Testing

4.4.1 Code coverage and Fault Models

Optimistic Scope

Method Scope Branch Coverage

Coverage for a Classless Language

ICpak Test Suite

Coverage Checklist

Incremental Class Testing

Class Interface Data Flow Coverage

Polymorphic Bindings

4.5 An OO Testing Manifesto

Unique Bug Hazards

Object-oriented Test Automation

Test Process

4.6 Bibliographic Notes

Part II Models

Chapter 5 Test Models

5.1 Test Design and Test Models

5.1.1 Why Testing Must Be Model-Based

5.1.2 What Is a Model?

5.1.3 The Role of Models in Testing

5.1.4 Cartoons or Test-ready Models?

5.1.5 Consequences

5.2 Bibliographic Notes

Chapter 6 Combinational Models

6.1 How Combinational Models Support Testing

6.2 How to Develop a Decision Table

6.2.1 Basic Approach

6.2.2 Components and Structure

6.2.3 The Auto Insurance Renewal Model

6.2.4 Don't Care,Don't Know,Can't Happen

6.2.5 Decision Tables in OO Development

6.3 Deriving the Logic Function

6.3.1 Boolean Expressions

6.3.2 Truth Tables versus Decision Tables

6.3.3 Elements of Boolean Expressions

6.3.4 Karnaugh-Veitch Matrix

6.3.5 Cause-effect Graphs

6.4 Decision Table Validation

6.5 Test Generation

6.5.1 Fault Model

6.5.2 All-Explicit Variants

6.5.3 All-variants,All-True,All-False,All-Primes

6.5.4 Each-Condition/All-Conditions

6.5.5 Binary Decision Diagram Determinants

6.5.6 Variable Negation

6.5.7 Nonbinary Variable Domain Analysis

6.5.8 Aditional Heuristics

6.6 Choosing a Combinational Test Strategy

6.7 Bibliographic Notes

Chapter 7 State Machines

7.1 Motivation

7.2 The Basic Model

7.2.1 What Is a State Machine?

7.2.2 State Transition Diagrams

7.2.3 Some Properties of Finite State Automata

7.2.4 Guarded Transitions

7.2.5 Mealy and Moore

7.2.6 State Transition Tables

7.2.7 Limitations of the Basic Model

7.2.8 Statecharts

7.2.9 State Machines and Object-oriented Development

7.3 The FREE Stat Model

7.3.1 Limitations of OOA/D Behavior Models

7.3.2 States

A Stat Is a Value Set

State Invariants

Scope and Granularity

No Hybrids Allowed

7.3.3 Transitions

7.3.4 Alpha and Omega States

7.3.5 Inheritance and Class Flattening

Flattening the Class Hierarchy

Expanding the Statechart

7.3.6 Unspecified Event/State Pairs

The Response Matrix

Designing Responses to Illegal Events

7.4 State-based Test Design

7.4.1 How State Machines Fail

Control Faults

Incorrect Composite Behavior

7.4.2 Developing a Testable Model

When and How

State Model Validation

7.4.3 The N+Test Strategy

The ThreePlayerGame Example

Generate the Round-trip Path Tree

Sneak Paths:Illegal Transitions and Evading the Guard

Event Path Sensitization

Built-in Test Support

Checking the Resultant State

7.4.4 Relative Power and Limitations

Piecewise

All Transitions

All n-Transition Sequences

All Round-trip Paths

M-Length Signature

7.4.5 Choosing a State-Based Test Strategy

7.5 Bibliographic Notes

Chapter 8 Tester's Guide to the UML

8.1 Introduction

8.1.1 The UML as a Test Model

8.1.2 Relational Testing Strategy

8.2 General-purpose Elements

8.2.1 Organization and Annotation

Package Diagrams and Packages

Keywords and Stereotypes

Expressions,Constraints,and Comments

Notes

Element Properties

8.2.2 Object Constraint Language

8.3 Use Case Diagram

8.3.1 Notation and Semantics

8.3.2 Generic Test Model

8.3.3 Testability Extensions

Operational Variables

The Operational Relation

8.4 Class Diagram

8.4.1 Notation and Semantics

Association

Aggregation

Generalization

8.4.2 Generic Test Model

8.5 Sequence Diagram

8.5.1 Notation and Semantics

8.5.2 Generic Test Requirements

8.5.3 Testability Extensions

8.6 Activity Diagram

8.6.1 Notation and Semantics

8.6.2 Generic Test Model

8.7 Statechart Diagram

8.8 Collaboration Diagram

8.8.1 Notation and Semantics

8.8.2 Generic Test Model

8.8.3 Testability Extensions

8.9 Component Diagram

8.9.1 Notation and Semantics

8.9.2 Generic Test Model

8.10 Deployment Diagram

8.10.1 Notation and Semantics

8.10.2 Generic Test Model

8.11 Graphs,Relations,and Testing

8.12 Bibliographic Notes

Part III Patterns

Chapter 9 Results-oriemted Test Strategy

9.1 Results-oriented Testing

9.1.1 The Role of Responsibility-based Test Design

Class Responsibilities

Why Test from Responsibility Models?

9.1.2 The Role of Implementation-based Test Design

9.1.3 Integration in Object-oriented Development

9.1.4 Harnessing Responsibility and Implementation

9.2 Test Design Patterns

9.2.1 What Is A Pattern?

9.2.2 Patterns and Testing

9.2.3 Test Design Pattern Template

Test Design Template

9.2.4 Test Patterns in This Book

9.2.5 Using Test Design Patterns

9.3 Documenting Test Cases,Suites,and Plans

9.3.1 IEEE 829 Documentation

9.3.2 Traceability

9.4 Bibliographic Notes

Chapter 10 Classes

10.1 Class Test and Integration

10.1.1 What Is Class Scope Testing?

10.1.2 why Test at Class Scope?

10.1.3 Who and When

10.1.4 A Case Study:MPR Teltech

10.2 Preliminaries

10.2.1 Class Scope Integration

Small Pop

Alpha-Omega Cycle

10.2.2 Implementation-based Test Models

The Role of Code Coverage

A Code Coverage FAQ

Method Scope Code Coverage Models

The Class Flow Graph:A Class Scope Coverage Model

Once More with Feeling:The Dark Side of Code Coverage

10.2.3 Path Sensitization

10.2.4 Domain Testing Models

Domain Analysis

On,Off,In,and Out

Boundary Conditions with Two or More Variables

Modeling the Domain of Objects

The One-by-One Selection Criteria

The Domain Test Matrix

10.3 Method Scope Test Design Patterns

10.3.1 functional Cohesion

10.3.2 Method Scope Integration

10.3.3 The Patterns

Category-Partition

Combinational Function Test

Recursive Function Test

Polymorphic Message Test

10.4 Class Scope Test Design Patterns

10.4.1 Class Modalities

10.4.2 The Patterns

Invariant Boundaries

Nonmodal Class Test

Quasi-modal Class Test

Modal Class Test

10.5 Flattened Class Scope Test Design Patterns

10.5.1 The Trouble with Superclasses

Some Definitions

Inheritance-related Bugs

10.5.2 Test Strategy for Flattened Classes

Testing Axioms

Some Subclass Development Scenarios

Inheriting Class Test Suites

10.5.3 The Patterns

Polymorphic Server Test

Modal Hierarchy Test

10.6 Bibliographic Notes

Chapter 11 Revsable Components

11.1 Testing and Reuse

11.1.1 Reuse Mechanisms

11.1.2 The Role of Testing in Reuse

11.1.3 Reusing Test Suites

11.2 Test Design Patterns

Abstract Class Test

Generic Class Test

New Framework Test

Popular Framework Test

11.3 Bibliographic Notes

Chapter 12 Subsystems

12.1 Subsystems

12.1.1 What Is a Subsystem?

12.1.2 Why Test at Subsystem Scope?

12.2 Subsystem Test Design Patterns

Class Association Test

Round-trip Scenario Test

Controlled Exception Test

Mode Machine Test

12.3 Bibliographic Notes

Chapter 13 Integration

13.1 Integration in Object-oriented Development

13.1.1 Definitions

13.1.2 Integration Testing Is Essential

13.1.3 Dependency Analysis

13.1.4 Integration Faults

13.2 Integration Patterns

13.2.1 Scope-specific Considerations

Classes

Clusters

Subsystem/System Scope

Big Bang Integration

Bottom-up Integration

Top-down Integration

Collaboration Integration

Backbone Integration

Layer Integration

Client/Server Integration

Distributed Services Integration

High-frequency Integration

13.3 Bibliographic Notes

Chapter 14 Application Systems

14.1 Testing Application Systems

14.1.1 A Cautionary Tale

14.1.2 Testing Object-oriented Application Systems

14.1.3 Application System Test Strategy

14.2 Test Design Patterns

Extended Use Case Test

Covered in CRUD

Allocate Tests by Profile

14.3 Implementation-specific Capabilities

14.3.1 Configuration and Compatibility

14.3.2 Performance

14.3.3 Integrity and Fault Tolerance

Concurrency Teseting

Stress Testing

Restart/Recovery Testing

14.3.4 Human-Computer Interaction

14.4 Post-development Testing

14.5 Notes on Testing Performance Objectives

14.5.1 Batch Systems

14.5.2 Interactive System

14.5.3 Real-time Systems

14.6 Bibliographic Notes

Chapter 15 Regression Testing

15.1 Preliminaries

15.1.1 What and Why

15.1.2 When and How

15.1.3 Regression Faults

15.1.4 Test Automation

15.1.5 Test Suite Maintenance

15.1.6 Considerations for Reducing a Test Suite

Safe Reduction

Unsafe Reduction

15.2 Test Patterns

Retest All

Retest Risky Use Cases

Retest by Profile

Retest Changed Code

Retest Within Firewall

15.3 Bibliographic Notes

Part IV Tools

Chapter 16 Test Automation

16.1 Why Testing Must Be Automated

16.2 Limitations and Caveats

Chapter 17 Assertions

17.1 Introduction

17.1.1 What Are Assertions?

17.1.2 Why Use Assertions?

17.1.3 Who Uses Assertions?

A Million Lines of Built-in Test:OS/400

17.2 Implementation-based Assertions

17.2.1 Assumption Checkers

17.2.2 Dark Alleys,Lurking Faults,and Sniffers

17.3 Responsibility-based Assertions

17.3.1 Overview

17.3.2 Responsibilities,Contracts,and Subtypes

The Contract Metaphor

Assertions and the UML

Assertion Strength and Weakness

17.3.3 Method Scope

Preconditions

Loops

Postconditions

17.3.4 Class Scope

17.3.5 Sequential Constraints

State Invariant

Accepting and Resulting Conditions

Runtime Sequence Checking

17.3.6 Superclass/Subclass Scope

Subcontracts and Type Substitution

Buggy Inheritance

17.3.7 Client/Server Scope

Public and Private Contrcts

Defensive Contracts?

Exceptions

17.4 Implementation

17.4.1 A Programmer's Assertion FAQ

17.4.2 Assertion Actions

17.4.3 Nonexecutable Assertions

17.4.4 Ada 95

Assert Pragma

Inline Assertion Procedure

17.4.5 C++

assert.h Macro

Assert Template

The Coherence Idiom

Tips and Tricks

17.4.6 Eiffel

17.4.7 Java

Basic Checking Capabilities

Final Static/Short Circuit Idion

17.4.8 Objective-C

OpenStep Foundation Kit Assertion Macros

17.4.9 Smalltalk

Context Assertion Method

Design-by-Contract Extensions

The Percolation Pattern

17.5 Deployment

17.5.1 Verification of Built-in Test

17.5.2 Using Assertions to Design Tests

Unarticulared Contracts

Practical Considerations

Test Suite Reduction

17.5.3 Prerelease Considerations

17.5.4 Post-release Considerations

17.6 Limitations and Caveats

17.7 Some Assertion Tools

17.8 Bibliographic Notes

Chapter 18 Orades

18.1 Introduction

18.2 Oracle Patterns

18.2.1 Introduction

Design Considerations

Choosing an Approach

Pattern Summary

18.2.2 Judging

18.2.3 Prespecification Oracles

Solved Example Oracle

Simulation Oracle

Approximation Oracle

Parametric Oracle

18.2.4 Gold Standard Oracles

Trusted System Oracle

Parallel Test Oracle

Regression Test Oracle

Voting Oracle

18.2.5 Organic Oracles

Smoke Test

Built-in Test Oracle

Built-in Check Oracle

Reversing Oracle

Executable Specification Oracle

Generated Implementation Oracle

Different But Equivalent Oracle

18.3 Comparators

18.3.1 Introduction

18.3.2 Determining Object Equality

18.3.3 Deep and Shallow Equality

18.3.4 Abstract Content Versus Concrete Content

18.3.5 Aliases

18.3.6 Collections

18.3.7 Type/Subtype Equality

18.3.8 Partial Equality Methods

18.4 Bibliographic Notes

Chapter 19 Test Harness Design

19.1 How to Develop a Test Harness

19.1.1 Requirements

19.1.2 Architecture

19.2 Test Case Patterns

19.2.1 Considerations

Test Case/Test Suite Method

Test Case/Test Suite Class

Catch All Exceptions

19.3 Test Control Patterns

19.3.1 Considerations

Server Stub

Server Proxy

19.4 Driver Patterns

19.4.1 Considerations

Design Goals

Inheriting Test Suites

Controllability,Observability,and Reuse

19.4.2 Driver Design Patterns

TestDriver Superclass

Percolate the Object Under Test

symmetric Driver

Subclass Driver

Private Access Driver

Test Control Interface

Drone

Built-in Test Driver

19.5 Test Execution Patterns

Command Line Test Bundle

Incremental Testing Framework

Fresh Objects

19.6 A Test Implementation Syntax

19.7 Bibliographic Notes

Appendix BigFoot's Tootsie:A Case Study

Requirements

1.Effective Tester Interface

2.Automate Test Generation

3.Automate Test Setup and Execution

OOA/D for Capability-driven Testing

Implementation

Test Control Strategy

Some Test Automation Scenarios

Glossary

References

Index