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
《中国大运河百问》内容简介:姜师立著的本书是大运河申遗成功后首部全面系统介绍以大运河为核心的历史文化资源的书籍,对运河沿线
《打造你的话语权》内容简介:采取不同寻常的沟通方式,说出富有力量而又不失风度的话语,就能高效解决生活中火星四射的交流困境,
DreamCase不是台灣一般認知的「Mook」,而是「MagBook」,以雜誌的概念、形式、內容來從事書的編輯,因此呈現方式可以更自由、更
《温故(二十五)》内容简介:2013年推出的第二辑《温故》, “影像”专栏刊出秦风老照片馆提供的图片共30幅,反映的时代集中在上世
会声会影11视频编辑从入门到精通【含盘】KH3656 本书特色 《会声会影11视频编缉从入门到精通》特色:资深DV玩家告诉你视频剪辑的你也可以像大导演一样轻松玩...
主板常用芯片及电路维修实用手册(含盘) 本书特色 主板是电脑的核心部件,是电脑能够实现各种功能的基础。而主板的核心则是其上面集成的各种电子元器件、各种功能的芯片...
《手机/电脑双平台剪映短视频后期编辑从新手到高手》内容简介:本书随着各大短视频平台的持续火爆,无论是视频创业者还是希望通过
《Puppet实战》内容简介:Puppet领域的经典之作,资深运维专家多年一线经验结晶,51cto技术社区强烈推荐,新浪研发中心平台架构部高
本书全面系统地介绍了JSP应用开发技术,包括JSP预备知识和环境配置、JSP编程基础、JSP应用开发进阶、在JSP中使用数据库、Servlet
嘉格伦(GlennR.Jones)先生是杰士知识公司和杰士国际大学的创始人和首席执行官。杰士知识公司和杰土国际大学的下属机构自1961年
《知行合一:悦读《传习录》》内容简介:《传习录》是明朝著名的哲学家、政治家、教育家和军事家王阳明的一部语录体哲学著作,内容
贯古今。横亘东西,文字的创造从来都蕴含着从独立单字(字母)到肇体布局统筹安排的多重要义。文字的设计从来便囊括了从创意到技艺
本书是系统学习Servlet和JSP的必读之作。由全球知名的Java技术专家(《HowTomcatWorks》作者)亲自执笔,不仅全面解读Servlet和J
写这本书之前,作者一直在摸索一种最有利于入门者学编程的方法,并应用到教学当中。经过两年的教学实践,他确信他的方法是有效的
JavaScript和JScript语言可以把HTML文档、用Java或AchveX编写的W组件及多媒体插入件集成起来,开发动态的、可响应各种用户输入的
《老年服务沟通实务》内容简介:本书根据养老照护员岗位的需求,设计项目和任务,设计了人际沟通技巧、接待沟通、团队工作沟通、照
《深入浅出设计模式》(影印版)的编写运用许多最新的研究,包括神经生物学、认知科学以及学习理论,这使得《深入浅出设计模式》(影
《Scala编程(第3版)》内容简介:本书由直接参与Scala开发的一线人员编写,因而对原理的解读和应用的把握更加值得信赖。本书面向具
《唯一的规则》内容简介:这本书,是李零阅读经典四部书(《论语》《老子》《孙子》《周易》)的第三本。对《孙子兵法》一书,不易
《StrutsHibernateSpring集成开发宝典》以Struts,Hibernate,Spring为核心详细地讲解了这三个组件的基础知识和基本使用方法,...