Docsity

quality of software g, Appunti di Ingegneria del Software

Anteprima parziale del testo

Scarica quality of software g e più Appunti in PDF di Ingegneria del Software solo su Docsity!

Software Testing and Analysis:

Process, Principles, and

Techniques

PUBLISHER Daniel Sayre SENIOR PRODUCTION EDITOR Lisa Wojcik EDITORIAL ASSISTANT Lindsay Murdock COVER DESIGNER Madelyn Lesure COVER PHOTO Rick Fischer/Masterfile WILEY 200 TH ANNIVERSARY LOGO DESIGN Richard J. Pacifico This book was typeset by the authors using pdfLATEXand printed and bound by Malloy Lithographing. The cover was printed by Phoenix Color Corp. This book is printed on acid free paper. •

Copyright c 2008 John Wiley & Sons, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc. 222 Rosewood Drive, Danvers, MA 01923, website www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, (201) 748-6011, fax (201) 748-6008, website http://www.wiley.com/go/permissions.

To order books or for customer service please, call 1-800-CALL WILEY (225-5945).

ISBN-13 978-0-471-45593- Printed in the United States of America 10 9 8 7 5 6 4 3 2 1

Contents

List of Figures xi

x CONTENTS

List of Figures

xvi LIST OF TABLES

Preface

This book addresses software test and analysis in the context of an overall effort to achieve quality. It is designed for use as a primary textbook for a course in software test and analysis or as a supplementary text in a software engineering course, and as a resource for software developers.

The main characteristics of this book are:

  • It assumes that the reader’s goal is to achieve a suitable balance of cost, sched- ule, and quality. It is not oriented toward critical systems for which ultra-high reliability must be obtained regardless of cost, nor will it be helpful if one’s aim is to cut cost or schedule regardless of consequence.
  • It presents a selection of techniques suitable for near-term application, with suf- ficient technical background to understand their domain of applicability and to consider variations to suit technical and organizational constraints. Techniques of only historical interest and techniques that are unlikely to be practical in the near future are omitted.
  • It promotes a vision of software testing and analysis as integral to modern soft- ware engineering practice, equally as important and technically demanding as other aspects of development. This vision is generally consistent with current thinking on the subject, and is approached by some leading organizations, but is not universal.
  • It treats software testing and static analysis techniques together in a coherent framework, as complementary approaches for achieving adequate quality at ac- ceptable cost.

Why This Book?

One cannot “test quality into” a badly constructed software product, but neither can one build quality into a product without test and analysis. The goal of acceptable quality at acceptable cost is both a technical and a managerial challenge, and meeting the goal requires a grasp of both the technical issues and their context in software development.

xvii

xix

nical background for many testing and analysis methods. Those interested in particular methods may proceed directly to the relevant chapters in Part III of the book. Where there are dependencies, the Required Background section at the beginning of a chap- ter indicates what should be read in preparation. Part IV discusses how to design a systematic testing and analysis process and incorporates it into an overall development process, and may be read either before or after Part III.

Readers new to the field of software test and analysis can obtain an overview by reading Chapters

1 Software Test and Analysis in a nutshell 2 A Framework for Test and Analysis 4 Test and Analysis Activities within a Software Process 10 Functional Testing 11 Combinatorial Testing 14 Model-Based Testing 15 Testing Object-Oriented Software 17 Test Execution 18 Inspection 19 Program Analysis 20 Planning and Monitoring the Process

Notes for Instructors

This book can be used in an introductory course in software test and analysis or as a supplementary text in an undergraduate software engineering course.

An introductory graduate-level or an undergraduate level course in software test and analysis can cover most of the book. In particular, it should include

  • All of Part I (Fundamentals of Test and Analysis), which provides a complete overview.
  • Most of Part II (Basic Techniques), which provides fundamental background, possibly omitting the latter parts of Chapters 6 (Dependence and Data Flow Models) and 7 (Symbolic Execution and Proof of Properties). These chapters are particularly suited for students who focus on theoretical foundations and those who plan to study analysis and testing more deeply.
  • A selection of materials from Parts III (Problems and Methods) and IV (Process).

For a course with more emphasis on techniques than process, we recommend

  • Chapter 10 (Functional Testing), to understand how to approach black-box test- ing.
  • The overview section and at least one other section of Chapter 11 (Combinatorial Testing) to grasp some combinatorial techniques.

xx Preface

  • Chapter 12 (Structural Testing), through Section 12.3, to introduce the basic cov- erage criteria.
  • Chapter 13 (Data Flow Testing), through Section 13.3, to see an important appli- cation of data flow analysis to software testing.
  • The overview section and at least one other section of Chapter 14 (Model-based Testing) to grasp the interplay between models and testing.
  • Chapter 15 (Testing Object-Oriented Software) to appreciate implications of the object-oriented paradigm on analysis and testing.
  • Chapter 17 (Test Execution), to manage an easily overlooked set of problems and costs.
  • Chapter 18 (Inspection) to grasp the essential features of inspection and appreci- ate the complementarity of analysis and test.
  • Chapter 19 (Program Analysis) to understand the role of automated program analyses and their relation to testing and inspection techniques.
  • Chapters 20 (Planning and Monitoring the Process), 21 (Integration and Component- based Software Testing), and 22 (System, Acceptance, and Regression Testing) to widen the picture of the analysis and testing process.

For a stronger focus on software process and organizational issues, we recommend

  • Chapter 10 (Functional Testing), a selection from Chapters 11 and 14 (Com- binatorial Testing and Model-Based Testing), and Chapters 15 (Testing Object- Oriented Software), 17 (Test Execution), 18 (Inspection), and 19 (Program Anal- ysis) to provide a basic overview of techniques.
  • Part IV, possibly omitting Chapter 23 (Automating Analysis and Test), for a comprehensive view of the quality process.

When used as a supplementary text in an undergraduate software engineering course, Chapters 1 (Software Test and Analysis in a Nutshell), and 2 (A Framework for Test and Analysis) can provide a brief overview of the field. We recommend completing these two essential chapters along with either Chapter 4, or a selection of chapters from Part III, or both, depending on the course schedule. Chapter 4 (Test and Analysis Activities within a Software Process) can be used to understand the essential aspects of a quality process. The following chapters from Part III will help students grasp essential techniques:

  • Chapter 10 (Functional Testing) and a selection of techniques from Chapters 11 (Combinatorial Testing) and 14 (Model-Based Testing), to grasp basic black-box testing techniques.
  • Chapter 12 (Structural Testing), through Section 12.3, to introduce basic cover- age criteria.