The art of software testing. Myers (2nd edition) (2004) (811502)
Текст из файла
The Art ofSoftwareTestingSecond EditionGlenford J. MyersRevised and Updated byTom Badgett and Todd M. Thomaswith Corey SandlerJohn Wiley & Sons, Inc.The Art ofSoftwareTestingThe Art ofSoftwareTestingSecond EditionGlenford J. MyersRevised and Updated byTom Badgett and Todd M. Thomaswith Corey SandlerJohn Wiley & Sons, Inc.Copyright © 2004 by Word Association, Inc.
All rights reserved.Published by John Wiley & Sons, Inc., Hoboken, New Jersey.Published simultaneously in Canada.No part of this publication may be reproduced, stored in a retrieval system, ortransmitted in any form or by any means, electronic, mechanical, photocopying,recording, scanning, or otherwise, except as permitted under Section 107 or 108 ofthe 1976 United States Copyright Act, without either the prior written permissionof the Publisher, or authorization through payment of the appropriate per-copy fee tothe Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923,(978) 750-8400, fax (978) 646-8600, or on the web at www.copyright.com.
Requeststo the Publisher for permission should be addressed to the Permissions Department,John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax(201) 748-6008.Limit of Liability/Disclaimer of Warranty: While the publisher and author have usedtheir best efforts in preparing this book, they make no representations or warrantieswith respect to the accuracy or completeness of the contents of this book andspecifically disclaim any implied warranties of merchantability or fitness for aparticular purpose.
No warranty may be created or extended by sales representativesor written sales materials. The advice and strategies contained herein may not besuitable for your situation. The publisher is not engaged in rendering professionalservices, and you should consult a professional where appropriate. Neither thepublisher nor author shall be liable for any loss of profit or any other commercialdamages, including but not limited to special, incidental, consequential, or otherdamages.For general information on our other products and services please contact ourCustomer Care Department within the United States at (800) 762-2974, outside theUnited States at (317) 572-3993 or fax (317) 572-4002.Wiley also publishes its books in a variety of electronic formats. Some content thatappears in print may not be available in electronic books. For more information aboutWiley products, visit our web site at www.Wiley.com.Library of Congress Cataloging-in-Publication Data:Myers, Glenford J.The art of software testing / Glenford J.
Myers ; Revised and updated by TomBadgett and Todd Thomas, with Corey Sandler.—2nd ed.p. cm.ISBN 0-471-46912-21. Computer software—Testing. 2. Debugging in computer science. I. Badgett, Tom.II. Thomas, Todd M. III. Sandler, Corey, 1950– IV. Title.QA76.6.M888 2004005.1'4—dc222004002227Printed in the United States of America10 9 8 7 6 5 4 3 2 1ContentsList of Figures and TablesPrefaceIntroductionixxixiiiChapter 1A Self-Assessment Test1Chapter 2The Psychology and Economicsof Program Testing5The Psychology of Testing 5The Economics of Testing 9Black-Box Testing 9White-Box Testing 11Software Testing Principles 14Summary 20Chapter 3Program Inspections, Walkthroughs,and ReviewsInspections and Walkthroughs 22Code Inspections 24An Error Checklist for Inspections 27Data Reference Errors 27Data-Declaration Errors 29Computation Errors 30Comparison Errors 31Control-Flow Errors 32Interface Errors 34Input/Output Errors 35Other Checks 38v21viContentsWalkthroughs 38Desk Checking 40Peer Ratings 40Summary 42Chapter 4 Test-Case DesignWhite-Box Testing 4443Logic-Coverage Testing 44Equivalence Partitioning 52An Example 56Boundary-Value Analysis 59Cause-Effect Graphing 65Error Guessing 88The Strategy 90Chapter 5 Module (Unit) TestingTest-Case Design 92Incremental Testing 105Top-down versus Bottom-up Testing 10991Top-down Testing 110Bottom-up Testing 116A Comparison 118Performing the Test 120Chapter 6 Higher-Order TestingFunction Testing 129System Testing 130Facility Testing 133Volume Testing 133Stress Testing 134Usability Testing 135Security Testing 137Performance Testing 137Storage Testing 138Configuration Testing 138123ContentsviiCompatibility/Configuration/Conversion Testing 138Installability Testing 139Reliability Testing 139Recovery Testing 141Serviceability Testing 142Documentation Testing 142Procedure Testing 142Performing the System Test 143Acceptance Testing 144Installation Testing 144Test Planning and Control 145Test Completion Criteria 148The Independent Test Agency 155Chapter 7 DebuggingDebugging by Brute Force 158Debugging by Induction 160Debugging by Deduction 164Debugging by Backtracking 168Debugging by Testing 169Debugging Principles 170157Error-Locating Principles 170Error-Repairing Techniques 171Error Analysis173Chapter 8 Extreme TestingExtreme Programming Basics 178Extreme Testing: The Concepts 183Extreme Unit Testing 183Acceptance Testing 185Extreme Testing Applied 186Test-Case Design 186Test Driver and Application 189Summary 191177viiiContentsChapter 9 Testing Internet ApplicationsBasic E-commerce Architecture 194Testing Challenges 196Testing Strategies 200193Presentation Layer Testing 202Business Layer Testing 205Data Layer Testing 208Appendix A Sample Extreme Testing Application213Appendix B Prime Numbers Less Than 1,000221Glossary223Index227List of Figures and TablesFigure 2.1Table 2.1Figure 2.2Table 3.1Table 3.2Figure 4.1Figure 4.2Figure 4.3Table 4.1Figure 4.4Figure 4.5Figure 4.6Figure 4.7Figure 4.8Figure 4.9Figure 4.10Figure 4.11Figure 4.12Figure 4.13Figure 4.14Figure 4.15Figure 4.16Figure 4.17Figure 4.18Figure 5.1Figure 5.2Table 5.1Control-Flow Graph of a Small ProgramVital Program Testing GuidelinesThe Surprising Errors Remaining/Errors Found RelationshipInspection Error Checklist Summary, Part IInspection Error Checklist Summary, Part IIA Small Program to Be TestedMachine Code for the Program in Figure 4.1A Form for Enumerating Equivalence ClassesEquivalence ClassesInput to the MTEST ProgramBasic Cause-Effect Graph SymbolsSample Cause-Effect GraphLogic Diagram Equivalent to Figure 4.6Constraint SymbolsSymbol for “Masks” ConstraintSample Cause-Effect Graph with “Exclusive”ConstraintSyntax of the DISPLAY CommandBeginning of the Graph for the DISPLAY CommandFull Cause-Effect Graph without ConstraintsComplete Cause-Effect Graph of the DISPLAY CommandConsiderations Used When Tracing the GraphSample Graph to Illustrate the Tracing ConsiderationsFirst Half of the Resultant Decision TableSecond Half of the Resultant Decision TableInput Tables to Module BONUSModule BONUSSituations Corresponding to the Decision Outcomesix121520363747505457626869697071717276777880818284939496xFigure 5.3Table 5.2Figure 5.4Figure 5.5Figure 5.6Figure 5.7Figure 5.8Figure 5.9Figure 5.10Figure 5.11Table 5.3Figure 6.1Figure 6.2Figure 6.3Figure 6.4Table 6.1Table 6.2Figure 6.5Figure 6.6Figure 7.1Figure 7.2Figure 7.3Figure 7.4Figure 7.5Table 8.1Table 8.2Table 8.3Figure 9.1Table 9.1Figure 9.2Table 9.2List of Figures and TablesTest Cases to Satisfy the Decision-Coverage CriterionSituations Corresponding to the Condition OutcomesTest Cases to Satisfy the Condition-Coverage CriterionTest Cases to Satisfy the Multicondition-Coverage CriterionSupplemental Boundary-Value-Analysis Test Casesfor BONUSSample Six-Module ProgramSample 12-Module ProgramSecond Step in the Top-down TestIntermediate State in the Top-down TestIntermediate State in the Bottom-up TestComparison of Top-down and Bottom-up TestingThe Software Development ProcessThe Development Process with IntermediateVerification StepsThe Correspondence between Development and TestingProcessesThe System TestHours per Year for Various Uptime RequirementsHypothetical Estimate of When the ErrorsMight Be FoundEstimating Completion by Plotting Errors Detectedby Unit TimePostmortem Study of the Testing Processesof a Large ProjectThe Inductive Debugging ProcessA Method for Structuring the CluesAn Example of Clue StructuringThe Deductive Debugging ProcessTest Case Results from the DISPLAY CommandThe 12 Practices of Extreme ProgrammingTest Case Descriptions for check4Prime.javaTest Driver MethodsTypical Architecture of an E-Commerce SiteExamples of Presentation, Business, and DataTier TestingDetailed View of Internet Application ArchitectureItems to Test in Each Tier979899100104106111113115118119124126127131141151153154161162163165166180187189195199202203PrefaceIn 1979, Glenford Myers publisheda book that turned out to be a classic.
Myers’s original The Art of Software Testing stood the test of time, 25 years on the publisher’s list ofavailable books. This fact alone is a testament to the solid, basic, andvaluable nature of his work.During that same time, the current authors of the updated versionof this book published collectively more than 120 books, most ofthem on computer software topics. Some of these books sold verywell, going through multiple versions. (Corey Sandler’s Fix Your OwnPC is in its seventh edition as this book is written, and Tom Badgett’sbooks on Microsoft PowerPoint and other Office titles went throughfour or more editions, for example.) Nevertheless, none of the currentauthors’ books remained current more than a few years.What is the difference? These newer books cover more transienttopics: operating systems, applications software, security, communications technology, and hardware configurations.
Характеристики
Тип файла PDF
PDF-формат наиболее широко используется для просмотра любого типа файлов на любом устройстве. В него можно сохранить документ, таблицы, презентацию, текст, чертежи, вычисления, графики и всё остальное, что можно показать на экране любого устройства. Именно его лучше всего использовать для печати.
Например, если Вам нужно распечатать чертёж из автокада, Вы сохраните чертёж на флешку, но будет ли автокад в пункте печати? А если будет, то нужная версия с нужными библиотеками? Именно для этого и нужен формат PDF - в нём точно будет показано верно вне зависимости от того, в какой программе создали PDF-файл и есть ли нужная программа для его просмотра.