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
亿万人在万维网上的各种活动,尽管是随机发生、随意展开、无人协调,但显现出了一些有趣的特征与明显的模式:从网络信息的结构,
《你离成功有多远》内容简介:十余年摸爬滚打的工作经历,从基层员工到公司副总经理的升迁轨迹,作者在其丰富的工作经历中,亲身经历和
《探绿:居住区植物配置宝典(北方植物卷)》内容简介:随着我国园林事业的快速发展,植物造景的技术和艺术得到了很大的进步。学者
杭间,1961年生于浙江义乌,文学博士,清华大学美术学院副院长,教授,博士生导师。毕业于中央工艺美术学院艺术史论系,1996年至2
BlogginghasmovedrapidlyfrombeingacrazetobecomeacorefeatureoftheInternetfromindiv...
《襄言随语:地方经济社会科学发展与改革创新》内容简介:本书是作者在湖北省襄阳市及随州市任职期间公开发表的讲话、报告、随笔集
这是一本非常棒的书,主要讲解如何用Photoshop处理图片和做商业设计。《抠图+修图+调色+合成+特效Photoshop核心应用5项修炼》以案
如果你可以编写出合格的代码,但是想更进一步、创作出组织良好而且易于理解的代码,并希望成为一名真正的编程专家或提高现有的职
《爱的教育》内容简介:特殊教育是对有特殊需求的青少年儿童进行特殊培养,培养和发挥他们的能力,使其能够增强适应社会能力的能力
《中国政党学说文献汇编(第三卷)》内容简介:第三卷收集的是1930—1949年间中国政党理论的文献资料。以编者查阅的国内报刊篇章、
SincedevelopmentfirstbeganonSpringin2003,theresbeenaconstantbuzzaboutitinJavadev...
《快速成型技术与应用》内容简介:本书对当今快速成型技术与应用的新信息进行了系统、全面的更新介绍,详细介绍了目前常用快速成型
《跨界协同育人共同体:思与行的融合》内容简介:上海中医药大学自2015年7成立“跨界协同育人共同体——服务学生成长导师团”。导师
《一本书读懂经济指标》内容简介:《一本书读懂经济指标》全面介绍了经济领域中的各项指标,从宏观的GDP、GNP、CPI等到微观的经理人
《日本军事力量解析(下册)》内容简介:自卫队是日本于第二次世界大战后组建的国家防卫力量。根据日本宪法规定,自卫队由防卫省统
《我爱问连岳之少年问答》内容简介:说到“少年”,我们常常会哼起那首熟悉的旋律:“小小少年,很少烦恼,眼望四周阳光照”。曾经
《子恺漫画精选集》内容简介:在中国漫画史上,丰子恺开创了中国抒情漫画的先河。他的漫画题材包罗万象,有古诗新画、儿童相、学生
Designingabrochureorwebsitewithoutanartbackground?Stepawayfromthecomputerandread...
《商业摄影核心课》内容简介:这是一本从基础入门技术出发,直指专业高度,揭示商业服装摄影专业技法的实用教材。本书从具体的拍摄
本书是一本全面系统地讲述计算机自然语言处理的优秀教材。本书英文版出版之后好评如潮,国外许多著名大学纷纷把本书选为自然语言