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
《商务英语写作100主题》内容简介:互联网+时代,你最需要的英语学习书! 100个商务主题,200篇标准范文,2000余个扩充例句,微信推
《一天25小时》内容简介:本书首次提出了以理财的观念来理时间,这一全新的时间管理视角,书中将时间管理分为6 个步骤,各部分以介
《激活自愈力:做自己的健康管理师》内容简介:本书纠正了目前大部分人群将健康交付于医生和药物的现象和思维模式,从而忽略了自己
《企业迷思:北大管理公开课》内容简介:这本书为作者宋志平在北大光华管理学院MBA讲堂的授课实录,共分战略、管理、创新、文化四个
李蕙蓁│研究所專研生態與觀光遊憩,喜愛藝術、設計、攝影,曾在望安與海龜結下不解之緣,擁有豐富的「龜」收藏。曾任報紙、雜誌
《奇点艺术》内容简介:艺术和科技领域的划时代作品,世界艺术专家、“奇点艺术”理念提出者对未来艺术的蜕变进行可靠的演绎和预测
本书作者曾因本书荣获专业技术杂志《JavaReport》评选的优秀作者奖,细心的读者可以从网上找到许多对本书第1版的赞誉。作者以易于
《信号与系统例题分析》共分7章,涵盖了信号及其基本运算、连续与离散时间系统的时域分析、傅里叶变换、离散时间傅里叶变换、傅里
《全面深化改革与世界经济》内容简介:“世界经济是失衡的”、“世界经济需要再平衡”这样的命题是当今的普遍共识,但对于“谁应当
Windows核心编程,ISBN:9787111079453,作者:(美)JeffreyRichter(J.理查特)著;王建华[等]译;王建华译目录 第一部分程...
基于模糊推理系统的工业过程数据挖掘 本书特色 本书基于模糊推理系统理论和数据挖掘思想,给出了一个比较完整的、从复杂工业过程模型辨识到控制策略设计的基本框架,力求...
KenAulettahaswrittenthe"AnnalsofCommunications"columnforTheNewYorkersince1992.He...
《世界何以至此》内容简介:◆史学大家许倬云重磅力作 ◆以“大历史观”俯瞰人类文明 ◆70年博学深思熔于一炉,展望未来 ◆增设30+
《中国社会建设现代化之路》内容简介:本书中国社会建设现代化,是一个崭新的重大理论与实践课题。作者积多年社会建设理论与实践经
计算机操作系统-(第三版) 本书特色 本书全面介绍了计算机系统中的一个重要软件——操作系统(OS),本书是第三版,对2001年出版的修订版的各章内容均作了较多的...
●商业与技术领域最重要的五部作品之一、超级畅销书《释放杀手级应用》作者拉里•唐斯力作。摩尔定律、梅特卡夫定律和颠覆定律是当
资深Java专家10年经验总结,全程案例式讲解,首本全面介绍Java多线程编程技术的专著结合大量实例,全面讲解Java多线程编程中的并
《设计与分析》一书内容共分6章,各章分别与以下这些设计因素有关:组织布局、实用功能、建筑结构、类型研究、背景环境及分析技巧
围绕如何实现高效调试这一主题,本书深入系统地介绍了以调试器为核心的各种软件调试技术。本书共30章,分为6篇。第1篇介绍了软件
《财务报表:快学快用实操笔记》内容简介:本书不仅由浅入深、由易到难地对财务报表的相关知识点进行了系统的编排,而且通过在每节