Automated testing is a cornerstone of agile development. An effective testing strategy will deliver new functionality more aggressively, accelerate user feedback, and improve quality. However, for many developers, creating effective automated tests is a unique and unfamiliar challenge. xUnit Test Patterns is the definitive guide to writing automated tests using xUnit, the most popular unit testing framework in use today. Agile coach and test automation expert Gerard Meszaros describes 68 proven patterns for making tests easier to write, understand, and maintain. He then shows you how to make them more robust and repeatable--and far more cost-effective. Loaded with information, this book feels like three books in one. The first part is a detailed tutorial on test automation that covers everything from test strategy to in-depth test coding. The second part, a catalog of 18 frequently encountered "test smells," provides trouble-shooting guidelines to help you determine the root cause of problems and the most applicable patterns. The third part contains detailed descriptions of each pattern, including refactoring instructions illustrated by extensive code samples in multiple programming languages. Topics covered include * Writing better tests--and writing them faster * The four phases of automated tests: fixture setup, exercising the system under test, result verification, and fixture teardown * Improving test coverage by isolating software from its environment using Test Stubs and Mock Objects * Designing software for greater testability * Using test "smells" (including code smells, behavior smells, and project smells) to spot problems and know when and how to eliminate them * Refactoring tests for greater simplicity, robustness, and execution speed This book will benefit developers, managers, and testers working with any agile or conventional development process, whether doing test-driven development or writing the tests last. While the patterns and smells are especially applicable to all members of the xUnit family, they also apply to next-generation behavior-driven development frameworks such as RSpec and JBehave and to other kinds of test automation tools, including recorded test tools and data-driven test tools such as Fit and FitNesse. Visual Summary of the Pattern Language Foreword Preface Acknowledgments Introduction Refactoring a Test PART I: The Narratives Chapter 1 A Brief Tour Chapter 2 Test Smells Chapter 3 Goals of Test Automation Chapter 4 Philosophy of Test Automation Chapter 5 Principles of Test Automation Chapter 6 Test Automation Strategy Chapter 7 xUnit Basics Chapter 8 Transient Fixture Management Chapter 9 Persistent Fixture Management Chapter 10 Result Verification Chapter 11 Using Test Doubles Chapter 12 Organizing Our Tests Chapter 13 Testing with Databases Chapter 14 A Roadmap to Effective Test Automation PART II: The Test Smells Chapter 15 Code Smells Chapter 16 Behavior Smells Chapter 17 Project Smells PART III: The Patterns Chapter 18 Test Strategy Patterns Chapter 19 xUnit Basics Patterns Chapter 20 Fixture Setup Patterns Chapter 21 Result Verification Patterns Chapter 22 Fixture Teardown Patterns Chapter 23 Test Double Patterns Chapter 24 Test Organization Patterns Chapter 25 Database Patterns Chapter 26 Design-for-Testability Patterns Chapter 27 Value Patterns PART IV: Appendixes Appendix A Test Refactorings Appendix B xUnit Terminology Appendix C xUnit Family Members Appendix D Tools Appendix E Goals and Principles Appendix F Smells, Aliases, and Causes Appendix G Patterns, Aliases, and Variations Glossary References Index
《海上文脉》内容简介:浓密的梧桐树叶,掩映着一幢幢历史优秀建筑;激昂的交响乐曲,演奏出一曲曲华彩乐章;宁静的藏书楼,珍藏着
《C语言学习指南:从规范编程到专业级开发》内容简介:本书分为五部分,通过大量简明易懂的范例由浅入深地演示C语言中的概念和编程
《锦笺记》内容简介:笺纸是古代文人用于书写的小幅花色纸张,其起源可以追溯到南北朝时期。历经唐宋之发展,至明代,笺纸追求精致
《合家欢的超萌简笔画》内容简介:《合家欢的超萌简笔画》大量运用最简单的几何体,画风软萌,以详解案例步骤为主;从单个几何体的
《香料在丝绸的路上浮香》内容简介:尚书郎在朝堂上含的“口香糖”鸡舌香,故乡远在太平洋中央的热带火山岛;印度佛教仪式中熏燃的
《丹尼尔·希利斯讲计算机》内容简介:虽然计算机技术及应用以及编程技术都取得了巨大进步,对社会产生的影响也远远超出了预言家的
这不仅仅是一本关于Perl的书籍,更是一本独一无二的开发者自己介绍该语言及其文化的书籍。LarryWall是Perl的开发者,他就这种语言
《经典诵读》内容简介:本书是基于高职学生学情,编撰的适用于晨读或课外阅读的文学读本。目的在于引导学生通过阅读传统经典,初步
《中国:将对世界做出更大贡献》内容简介:“一带一路”倡议是21世纪的中国向世界发出的时代倡议,正在也必将给广大发展中国家,乃
如果不是「包浩斯」,世界不是你眼中所見的樣子最前衛的藝術設計學校最前衛的藝術設計運動最經典.最普及的「包浩斯」論著英、美
《鲜活的数据》内容简介:在生活中,数据几乎无处不在,任我们取用。然而,同样的数据给人的感觉可能会千差万别:或冰冷枯燥,让人
深入理解SOA与Web服务,对SOA进行全面介绍的实践指南:简化基础设施,发挥最大的机动性这是一本关于使用面向服务的架构(SOA,Se
《电子竞技概论》内容简介:本书是电子竞技运动与管理专业规划教材,同时也是校企合作“双元”育人规划教材,由浙江网竞教育科技有
《网页配色实用手册》在日常生活中,色彩早已广泛地深入到人们的精神生活和物质生活中,它是一种能够激发情感、刺激感官的重要元
ThisbookisaboutlearningtoprograminLisp.Althoughwidelyknownastheprincipallanguage...
比尔・盖茨继《未来之路》后又一新作快速发展的未来将会怎样?今天的管理者们能做什么?比尔・盖茨在《未来时速》中提出了一个新
SolidWorks 2016机械设计从入门到精通-中文版-(附光盘) 本书特色 solidworks是世界上首套专门基于windows系统开发的三维cad软件...
《通信原理》(第5版)是在1980、1984、1988、1995年出版的《通信原理》教材的基础上,根据科技发展和教学改革实践的需要,经评审和
《人间草木(插图本)》内容简介:汪曾祺的散文创作大致可分为:记人事,写风景,谈文化,述掌故,兼及草木鱼虫、瓜果食物等。因为
无线技术已成为电信和网络界最热门的研究领域。本书的内容丰富且新颖,包括基本的无线通信原理,以及各种无线网络的协议和应用。