Developer.Testing.Building.Quality.into.Software

所需积分/C币:10 2016-10-31 11:46:00 9.06MB PDF
收藏 收藏
举报

How do successful agile teams deliver bug-free, maintainable software—iteration after iteration? The answer is: By seamlessly combining development and testing. On such teams, the developers write testable code that enables them to verify it using various types of automated tests. This approach keep
This page intentionally left blank DEVELOPER TESTING BUILDING QUALITY INTO SOFTWARE ALEXANDER TARLINDER WAddison-Wesley oston. columbus● Indianapolis· New york· San francisco· Amsterdam· Cape town Dubai. London· Madrid· Milan. munich· Paris. montreal· Toronto delhi. Mexico City Paulo Sydney hong kons oul● Singapore· Taipei· Tokyo Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals he author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omis sions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at corpsales@pearsoned com or( 800)382-3419 orgovernmentsalesinquiriespleasecontactgovernmentsales@pearsoned.com Forquestionsaboutsalesoutsidetheu.S.,pleasecontactintlcs@pearson.com Visit us on the Web: informit. com/aw Library of Congress Control Number: 2016944434 Copyright o 2017 Pearson Education, Inc All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding per missions, request forms and the appropriate contacts within the pearson Education globa Rights&PermissionsDepartmentpleasevisitwww.pearsoned.com/permissions, ISBN-13:978-0-13-429106-2 ISBN-10:0-13-429106-9 Text printed in the United States on recycled paper at RR Donnelley in Crawfordsville, Indiana 116 To my grandfather romuald, who taught me about books This page intentionally left blank CONTENTS Foreword by jeff lang Foreword by Lisa Crispin erace Acknowledgments about the author XXV Developer Testing Developers Test Developer Testing Activities 2 What Developers Usually Dont Do Defining Developer Testing Developer Testing and the Development Process Summary Chapter 2 Testing Objectives, Styles, and roles Testing and Checking Testing Objectives Testing Styles Your Quality Assurance and Developer Testing 18 Summary 9 hapter 3 The Testing Vocabulary 21 Errors Defects, Failure 22 White box and black box testing g 22 Classifying tests 23 The Agile Testing Quadrants 32 Some Other Types of Testing Summary 36 vIlI Contents Chapter 4 Testability from a Developer's Perspective Testable software 37 Benefits of Testability 39 Testability Defined 43 ummar Chapter 5 Programming by Contract Contracts formalize constraints 57 Implementing Programming by Contract 60 Enforcing Contracts Summary 65 Chapter 6 Drivers of Testability Direct Input and Output 68 Indirect Input and output 68 State 70 Temporal Coupling 71 Data Types and Testability Domain-to-Range Ratio Summary 78 Chapter 7 Unit Testing 79 Why Do it? What Is a Unit Test? The Life Cycle of a Unit Testing Framework Naming tests 85 Structuring Tests 88 Assertion methods Testing Exceptions 99 Behavior-driven Development-Style Frameworks 102 ummar 105 Chapter 8 Specification-based Testing Techniques Equivalence Partitioning 107 Boundary value analysis 110 Edge Cases and Gotchas for Some Data Types 111 State Transition Testing 113 Decision tables Summar y 116 Contents Chapter 9 Dependencies 19 Relations between Objects 119 System Resource dependencies 125 Dependencies between layers 129 Dependencies across tiers 132 Summary 133 Chapter 10 Data-driven and Combinatorial Testing 135 Parameterized tests 138 Theories 139 Generative Testing 141 Combinatorial Testing 145 Summary 149 Chapter l1 Almost Unit Tests Examples 152 Impact 156 Summary 157 Chapter 12 Test Doubles Stubs 159 Fakes 162 Mock objects 164 Spies 170 Dummies 171 Verify state or behavior 173 ummary 176 Chapter 13 Mocking Frameworks T77 Constructing Test Doubles 177 Setting Expectations 179 Verifying interactions 183 Misuse. Overuse, and other pitfalls 185 Summary 189 Chapter 14 Test-driven Development-Classic Style Test-driving a Simple search engine 192 Order of Tests 204 Red-to Green-bar Strategies 205

...展开详情
试读 127P Developer.Testing.Building.Quality.into.Software
立即下载 低至0.43元/次 身份认证VIP会员低至7折
抢沙发
一个资源只可评论一次,评论内容不能少于5个字
上传资源赚积分or赚钱
最新推荐
Developer.Testing.Building.Quality.into.Software 10积分/C币 立即下载
1/127
Developer.Testing.Building.Quality.into.Software第1页
Developer.Testing.Building.Quality.into.Software第2页
Developer.Testing.Building.Quality.into.Software第3页
Developer.Testing.Building.Quality.into.Software第4页
Developer.Testing.Building.Quality.into.Software第5页
Developer.Testing.Building.Quality.into.Software第6页
Developer.Testing.Building.Quality.into.Software第7页
Developer.Testing.Building.Quality.into.Software第8页
Developer.Testing.Building.Quality.into.Software第9页
Developer.Testing.Building.Quality.into.Software第10页
Developer.Testing.Building.Quality.into.Software第11页
Developer.Testing.Building.Quality.into.Software第12页
Developer.Testing.Building.Quality.into.Software第13页
Developer.Testing.Building.Quality.into.Software第14页
Developer.Testing.Building.Quality.into.Software第15页
Developer.Testing.Building.Quality.into.Software第16页
Developer.Testing.Building.Quality.into.Software第17页
Developer.Testing.Building.Quality.into.Software第18页
Developer.Testing.Building.Quality.into.Software第19页
Developer.Testing.Building.Quality.into.Software第20页

试读结束, 可继续阅读

10积分/C币 立即下载 >