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
Theauthorintroduceselectricalprinciplesandtechnologythroughexamplesratherthanthe...
机器人学导论-(原书第3版) 本书特色 Craig教授根据机器人学的特点,将理论和实际应用密切结合,按照刚体力学、分析力学、机构学和控制理论中的原理和定义对机器...
JeffcTapper,Adobe技术社区最有影响力的专家之一,拥有丰富的Web开发经验,客户包括摩根士丹利、IBM、道琼斯等公司。他还是WebcDev
《我们的历史:夏商周》内容简介:本书以时间为轴,通过一个个生动的中国历史故事将原本看似冷冰冰的、由一大串数字和人名堆砌的历
IncludesupdatestomaterialontestingWebapplications.Containsnewcoverageoftestingfo...
《Arduino互动设计》内容简介:本书使用Arduino硬件平台和Mixly图形化编程工具,从简单的“点亮创客之灯”开始,以生活中常见的具体
《功能主义的刑法解释》内容简介:在风险社会的背景下,刑法解释在方法论上面临转型的命题。为确保刑法体系与外部环境之间实现有效
JenniferHudsonJenniferHudsonisanauthorinthefieldsofcontemporarydesignandarchitec...
游戏软件艺术设计 本书特色 本书着重介绍游戏的艺术设计部分,将庞大的游戏开发工程分解为8个章节,并以实例为主线,引导读者步步深入,使读者对游戏的历史、未来和美术...
本书是日本东京吉祥寺人气生活杂货店老板,从他生活中实际使用的物品,严选170件既实用又具美感的经典好设计而集结而成。里头有的
Theoreticalneuroscienceprovidesaquantitativebasisfordescribingwhatnervoussystems...
《OpenCV项目开发实战(原书第2版)》内容简介:本书内容精练、重点突出、示例丰富。作者用幽默风趣、简洁生动的语言,通过实际的编
《多核应用编程实战》是一本全面实用的多核应用编程指南,旨在介绍如何编写功能正确、性能优越且适合扩展为在多个CPU核心的系统运
【本书目录】Introduction7WhyVintage?THeClothes14Greatvintagepieceswornbywomenlikeyou.E...
《JavaWeb入门经典》以初学者为核心,全面介绍了JavaWeb开发中常用的各种技术。内容排列上由浅入深,让读者循序渐进掌握编程技术
《朱自清散文》内容简介:《朱自清散文》为现代散文大家朱自清散文精选集,本书稿所收入的篇目大多广为流传,包括历来都被作为白话
WEB+DBPRESS是日本主流的计算机技术杂志,旨在帮助程序员更实时、深入地了解前沿技术,扩大视野,提升技能。内容侧重于Web开发的
《ASP.NET4从入门到精通》以ASP.NET应用程序开发为主题,全面介绍了ASP.NET4的所有功能和特性。书中采用深受读者欢迎的stepbyste
《孝经:忠经》内容简介:孝与忠,是中国古代儒家学说的重要内涵,对古代中国人影响至深至远。《孝经》十八章,成于秦汉之际,南宋
《数据库可靠性工程:数据库系统设计与运维指南》内容简介:数据是当今企业的宝贵资产,设计、构建并维护数据存储的重要性不言而喻