ebook img

Software Testing: Principles and Practices PDF

674 Pages·2018·20.213 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Software Testing: Principles and Practices

S oftware t eSting Software-Testing_Final.indb 1 31-01-2018 14:55:51 LICENSE, DISCLAIMER OF LIABILITY, AND LIMITED WARRANTY By purchasing or using this book (the “Work”), you agree that this license grants permission to use the contents contained herein, but does not give you the right of ownership to any of the textual content in the book or ownership to any of the information or products contained in it. This license does not permit uploading of the Work onto the Internet or on a network (of any kind) without the written consent of the Publisher. Duplication or dissemination of any text, code, simulations, images, etc. contained herein is limited to and subject to licensing terms for the respective products, and permission must be obtained from the Publisher or the owner of the content, etc., in order to reproduce or network any portion of the textual material (in any media) that is contained in the Work. Mercury Learning and inforMation (“MLI” or “the Publisher”) and anyone involved in the creation, writing, or production of the companion disc, accom- panying algorithms, code, or computer programs (“the software”), and any accompanying Web site or software of the Work, cannot and do not warrant the performance or results that might be obtained by using the contents of the Work. The author, developers, and the Publisher have used their best efforts to insure the accuracy and functionality of the textual material and/or programs contained in this package; we, however, make no warranty of any kind, express or implied, regarding the performance of these contents or programs. The Work is sold “as is” without warranty (except for defective materials used in manufacturing the book or due to faulty workmanship). The author, developers, and the publisher of any accompanying content, and anyone involved in the composition, production, and manufacturing of this work will not be liable for damages of any kind arising out of the use of (or the inability to use) the algorithms, source code, computer programs, or textual material contained in this publication. This includes, but is not limited to, loss of revenue or profit, or other incidental, physical, or consequential damages arising out of the use of this Work. The sole remedy in the event of a claim of any kind is expressly limited to replacement of the book, and only at the discretion of the Publisher. The use of “implied warranty” and certain “exclusions” vary from state to state, and might not apply to the purchaser of this product. Software-Testing_Final.indb 2 31-01-2018 14:55:51 S oftware t eSting A Self-Teaching Introduction RAJIV CHOPRA, PhD MERCURY LEARNING AND INFORMATION Dulles, Virginia Boston, Massachusetts New Delhi Software-Testing_Final.indb 3 31-01-2018 14:55:52 Copyright ©2018 by Mercury Learning and InforMation LLC. All rights reserved. Original Title and Copyright: Software Testing, 4/e. © 2014 by S.K. Kataria & Sons. This publication, portions of it, or any accompanying software may not be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means, media, electronic dis- play or mechanical display, including, but not limited to, photocopy, recording, Internet postings, or scanning, without prior permission in writing from the publisher. Publisher: David Pallai Mercury Learning and InforMation 22841 Quicksilver Drive Dulles, VA 20166 [email protected] www.merclearning.com (800) 232-0223 R. Chopra. Software Testing: A Self-Teaching Introduction. ISBN: 978-1-683921-66-0 The publisher recognizes and respects all marks used by companies, manufacturers, and develop- ers as a means to distinguish their products. All brand names and product names mentioned in this book are trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of service marks or trademarks, etc. is not an attempt to infringe on the property of others. Library of Congress Control Number: 2017960714 181920321 This book is printed on acid-free paper in the United States of America Our titles are available for adoption, license, or bulk purchase by institutions, corporations, etc. For additional information, please contact the Customer Service Dept. at 800-232-0223(toll free). All of our titles are available in digital format at authorcloudware.com and other digital vendors. The sole obligation of Mercury Learning and inforMation to the purchaser is to replace the book, based on defective materials or faulty workmanship, but not based on the operation or functionality of the product. Software-Testing_Final.indb 4 31-01-2018 14:55:52 CONTENTS Chapter 1: Introduction to Software Testing 1 1.0. Introduction 1 1.1. The Testing Process 2 1.2. What is Software Testing? 2 1.3. Why Should We Test? What is the Purpose? 6 1.4. Who Should do Testing? 9 1.5. How Much Should We Test? 9 1.6. Selection of Good Test Cases 9 1.7. Measurement of Testing 10 1.8. Incremental Testing Approach 10 1.9. Basic Terminology Related to Software Testing 11 1.10. Testing Life Cycle 17 1.11. When to Stop Testing? 18 1.12. Principles of Testing 18 1.13. Limitations of Testing 19 1.14. Available Testing Tools, Techniques, and Metrics 20 Summary 20 Multiple Choice Questions 21 Answers 22 Conceptual Short Questions With Answers 22 Review Questions 26 Software-Testing_Final.indb 5 31-01-2018 14:55:52 vi • Contents Chapter 2: Software Verification and Validation 29 2.0. Introduction 29 2.1. Differences between Verification and Validation 30 2.2. Differences between QA And QC? 31 2.3. Evolving Nature of Area 31 2.4. V&V Limitations 32 2.5. Categorizing V&V Techniques 33 2.6. Role of V&V in SDLC—Tabular Form [IEEE std. 1012] 33 2.7. Proof of Correctness (Formal Verification) 37 2.8. Simulation and Prototyping 38 2.9. Requirements Tracing 38 2.10. Software V&V Planning (SVVP) 39 2.11. Software Technical Reviews (STRs) 43 2.11.1. Rationale for STRs 43 2.11.2. Types of STRs 45 2.11.3. Review Methodologies 46 2.12. Independent V&V Contractor (IV&V) 47 2.13. Positive and Negative Effects of Software V&V on Projects 48 2.14. Standard for Software Test Documentation (IEEE829) 50 Summary 57 Multiple Choice Questions 58 Answers 59 Conceptual Short Questions With Answers 59 Review Questions 62 Chapter 3: Black-Box (or Functional) Testing Techniques 65 3.0. Introduction to Black-Box (or Functional Testing) 65 3.1. Boundary Value Analysis (BVA) 66 3.1.1. What is BVA? 66 3.1.2. Limitations of BVA 67 3.1.3. Robustness Testing 67 3.1.4. Worst-Case Testing 68 3.1.5. Examples with Their Problem Domain 69 3.1.6. Guidelines for BVA 74 Software-Testing_Final.indb 6 31-01-2018 14:55:52 Contents • vii 3.2. Equivalence Class Testing 74 3.2.1. Weak Normal Equivalence Class Testing 75 3.2.2. Strong Normal Equivalence Class Testing 76 3.2.3. Weak Robust Equivalence Class Testing 76 3.2.4. Strong Robust Equivalence Class Testing 77 3.2.5. Solved Examples 78 3.2.6. Guidelines for Equivalence Class Testing 85 3.3. Decision Table Based Testing 86 3.3.1. What are Decision Tables? 86 3.3.2. Advantages, Disadvantage, and Applications of Decision Tables 87 3.3.3. Examples 90 3.3.4. Guidelines for Decision Table Based Testing 96 3.4. Cause-Effect Graphing Technique 97 3.4.1. Causes and Effects 97 3.4.2. Test Cases for the Triangle Problem 98 3.4.3. Test Cases for Payroll Problem 100 3.4.4. Guidelines for the Cause-Effect Functional Testing Technique 101 3.5. Comparison on Black-Box (or Functional) Testing Techniques 102 3.5.1. Testing Effort 102 3.5.2. Testing Efficiency 104 3.5.3. Testing Effectiveness 104 3.5.4. Guidelines for Functional Testing 105 3.6. Kiviat Charts 105 3.6.1. The Concept of Balance 107 Summary 115 Multiple Choice Questions 115 Answers 117 Conceptual Short Questions With Answers 117 Review Questions 127 Software-Testing_Final.indb 7 31-01-2018 14:55:52 viii • Contents Chapter 4: White-Box (or Structural) Testing Techniques 133 4.0. Introduction to White-Box Testing or Structural Testing or Clear-Box or Glass-Box or Open-Box Testing 133 4.1. Static versus Dynamic White-Box Testing 134 4.2. Dynamic White-Box Testing Techniques 135 4.2.1. Unit/Code Functional Testing 135 4.2.2. Code Coverage Testing 136 4.2.3. Code Complexity Testing 141 4.3. Mutation Testing Versus Error Seeding—Differences in Tabular Form 186 4.4. Comparison of Black-Box and White-Box Testing in Tabular Form 188 4.5. Practical Challenges in White-Box Testing 190 4.6. Comparison on Various White-Box Testing Techniques 190 4.7. Advantages of White-Box Testing 191 Summary 192 Multiple Choice Questions 192 Answers 194 Conceptual Short Questions With Answers 194 Review Questions 200 Chapter 5: Gray-Box Testing 207 5.0. Introduction to Gray-Box Testing 207 5.1. What is Gray-Box Testing? 208 5.2. Various Other Definitions of Gray-Box Testing 208 5.3. Comparison of White-Box , Black-Box, and Gray-Box Testing Approaches in Tabular Form 209 Summary 211 Multiple Choice Questions 211 Answers 212 Conceptual Short Questions With Answers 212 Review Questions 213 Software-Testing_Final.indb 8 31-01-2018 14:55:52 Contents • ix Chapter 6: Reducing the Number of Test Cases 215 6.0. Prioritization Guidelines 215 6.1. Priority Category Scheme 216 6.2. Risk Analysis 217 6.3. Regression Testing—Overview 220 6.3.1. Differences between Regression and Normal Testing 220 6.3.2. Types of Regression Testing 221 6.4. Prioritization of Test Cases for Regression Testing 224 6.5. Regression Testing Technique—A Case Study 225 6.6. Slice-Based Testing 226 Summary 228 Multiple Choice Questions 228 Answers 230 Conceptual Short Questions With Answers 231 Review Questions 233 Chapter 7: Levels of Testing 235 7.0. Introduction 235 7.1. Unit, Integration, System, and Acceptance Testing Relationship 236 7.2. Integration Testing 237 7.2.1. Classification of Integration Testing 238 7.2.2. Decomposition-Based Integration 238 7.2.3. Call Graph-Based Integration 241 7.2.4. Path-Based Integration with its Pros and Cons 243 7.2.5. System Testing 246 Summary 291 Multiple Choice Questions 292 Answers 293 Conceptual Short Questions With Answers 293 Review Questions 298 Software-Testing_Final.indb 9 31-01-2018 14:55:52 x • Contents Chapter 8: Object-Oriented Testing 301 8.0. Basic Unit for Testing, Inheritance, and Testing 302 8.1. Basic Concepts of State Machines 310 8.2. Testing Object-Oriented Systems 333 8.2.1. Implementation-Based Class Testing/ White-Box or Structural Testing 333 8.2.2. Responsibility-Based Class Testing/ Black-Box/Functional Specification-Based Testing of Classes 345 8.3. Heuristics for Class Testing 356 8.4. Levels of Object-Oriented Testing 363 8.5. Unit Testing a Class 364 8.6. Integration Testing of Classes 367 8.7. System Testing (With Case Study ) 371 8.8. Regression and Acceptance Testing 381 8.9. Managing the Test Process 383 8.10. Design for Testability (DFT) 387 8.11. GUI Testing 390 8.12. Comparison of Conventional and Object-Oriented Testing 390 8.13. Testing using Orthogonal Arrays 392 8.14. Test Execution Issues 394 8.15. Case Study—Currency Converter Application 394 Summary 403 Multiple Choice Questions 404 Answers 405 Conceptual Short Questions With Answers 406 Review Questions 408 Chapter 9: Automated Testing 409 9.0. Automated Testing 409 9.1. Consideration during Automated Testing 410 9.2. Types of Testing Tools-Static V/s Dynamic 411 9.3. Problems with Manual Testing 413 Software-Testing_Final.indb 10 31-01-2018 14:55:52

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.