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
供应链的超级赌注、全球化的中国较量、核发技术争峰、本土渠道抢位资深记者十八个月深入调查、业内专家和咨询公鼎力相助、揭示营
游戏设计师修炼秘笈 内容简介 《游戏设计师修炼秘笈》是一本训练游戏设计师的书籍,旨在启发、提高读者的头脑风暴能力和游戏设计技能。全书充满了令人愉悦的、有趣的以及...
VB-MAPP语言行为里程碑评估及安置程序-(全2册) 本书特色 这套《语言行为里程碑及安置程序》为教育人员和家长对孤独症和其他发展性障碍孩子的学习、语言和社会...
《当你路过我的阳光》内容简介:当我的天空灰暗时,你把快乐带来,你是我的阳光,我唯一的阳光。假如我的世界你不曾来过,我的心将
《捍卫隐私》内容简介:你的密码可以被轻易破解? 除了你,还有谁在读你的电子邮件? 你的手机就是一个窃听器? 勒索病毒是如何一步
《Linux就该这么学》内容简介:本书基于最新的红帽RHEL系统编写,且内容通用于CentOS、Fedora等系统。本书共分为20章,内容涵盖了部
《奠基:苏联援华156项工程始末》内容简介:1953-1957年,新中国实施了第一个五年计划。以这一时期为主,苏联帮助中国建设了156项工
《Python人工智能项目实战》内容简介:本书可帮助你结合深度学习和强化学习来构建智能而且实用的基于人工智能的系统。本书涉及的项
《区块链启示录:中本聪文集》内容简介:本书整理了中本聪所发表的比特币白皮书、在几个网络论坛的对话精选以及部分相关的私人往来
大多数的设计师在职业发展上都得先靠自吹自擂作保证,先接下各种自己不熟悉的设计案,再硬着头皮摸索出一条路。本书提供的80个创
《打造高质量Android应用:Android开发必知的50个诀窍》是目前唯一一本从开发技巧角度讲解Android应用开发的著作,旨在迅速提高开
《赵晓生钢琴独奏作品集》内容简介:《赵晓生钢琴独奏作品集》收入了创作乐曲6首,如《太极》;改编乐曲《青松岭》等6首;音乐会练
《MySQL必知必会》MySQL是世界上最受欢迎的数据库管理系统之一。书中从介绍简单的数据检索开始,逐步深入一些复杂的内容,包括联
《性别、设计与营销:如何根据性别差异进行设计和营销》对设计和营销进行了全面的性别研究。作者通过引用大量的心理学、设计学、广
C程序设计语言(第2版.新版)习题解答 本书特色 本书是对Brian W.Kernighan和Dennis M.Ritchie所著的《C程序设计语言(第2版·新...
本书着重讲解采用波形级仿真技术来评估通信系统性能的原理、方法和实现技术。回顾和总结了相关理论基础,重点讨论实用性的方法,
《TTT5.0培训师的大脑》内容简介:TTT技术自20世纪90年代进入中国培训市场,历经20多年的发展,几经迭代,已然进入TTT5.0阶段——大
BlogginghasmovedrapidlyfrombeingacrazetobecomeacorefeatureoftheInternetfromindiv...
《向NASA学工程师文化》内容简介:太空探索既是一个关于探索和发现的故事,也是一个关于领导力和团队合作的故事。本书深入探讨了NA
数据库基础与应用-Access 2010 本书特色 付兵主编的《数据库基础与应用:Access 2010》共10章,从数据库的基础理论开始,以“学生成绩管理”系...