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
本书通过分析ReactOS的源代码介绍了Windows内核各个方面的结构、功能、算法与具体实现。全书从“内存管理”、“进程”、“进程间
本书是一部讲述现代web标准的优秀教程,彻底摒弃了过时的内容,始终贯彻三层分离的思想。书中结合实例讲述如何使用html、css设计
深入浅出移动互联网-(影印版) 本书特色 我们认为你的时间如此宝贵以至于不应该花费在为新概念伤脑筋上面。《深入浅出移动互联网(影印版)》由lyza da...
在线阅读本书Web2.0architectureopensupanincrediblenumberofoptionsforflexiblewebdesign,c...
软件测试(原书第2版),ISBN:9787111185260,作者:(美)佩腾(Patton,R.)著,张小松等译;张小松译作者简介 RonPatton具有
TherevisedqualitymanagementsystemsISO9001:2000wasputinplaceinDecember2000.Therei...
《冬韵奥林匹克》内容简介:本书从艺术欣赏角度介绍了冬奥会的历史和风采,展示冬奥文化的魅力,介绍了北京申请冬奥会举办权的历程
《不畏将来 不念过去2》内容简介:畅销两百万册作者十二升华之作。时隔6年十二用全新观点,告诉你如何从容面对恋爱、婚姻和原生家庭
《推开红酒的门》内容简介:葡萄酒的世界很有趣,但是初学者往往遇上麻烦:在餐厅,看着酒单上密密麻麻的字一脸懵;面对货架上琳琅
《撑下去便是一切》内容简介:这是一本讲述如何通向成功的励志实用功能性图书,描述了一个年轻人的艰辛历程。主人公的思考、总结和
《景观设计手绘表现》内容简介:《景观设计手绘表现——线稿与马克笔上色技法》针对景观设计手绘马克笔快速表现技法进行有针对性的
C语言程序设计 内容简介 C语言是国内外广泛使用的计算机语言,是计算机从业人员应该掌握的一种重要的程序设计工具。本书是针对应用型人才的培养要求,经过精心策划,准...
《胜利小队》内容简介:“了不起的许多多”系列作品由《胜利小队》《竞选风波》《温暖引力》《皇冠小子》四本组成,是冰心奖、陈伯
《商业美食摄影必修课》内容简介:本书结合作者多年美食摄影的工作经验,用大量的作品和实际案例,由浅及深地向读者描绘了一条美食
《狙击步枪大百科(图鉴版)》内容简介:《狙击步枪大百科·图鉴版/现代兵器百科图鉴系列》精选了世界各国研制的数十种经典狙击步枪
《超级国宝:全2册》内容简介:本书由喜马拉雅艺术畅销榜前列、评分9.8分的音频节目《国宝来了》结集而成。50位中国一级博物馆的主
《移动通信频谱技术与5G频率部署》内容简介:无线电频谱是所有无线电业务的稀缺、关键资源。对移动运营商而言,频谱资源是网络建设
精通Git-第2版 本书特色 Git仅用了几年时间就一跃成为了几乎一统商业及开源领域的版本控制系统。本书全面介绍Git进行版本管理的基础和进阶知识。全书共10章...
《编程语言实现模式》旨在传授开发语言应用(工具)的经验和理念,帮助读者构建自己的语言应用。这里的语言应用并非特指用编译器
《PythonUNIX和Linux系统管理指南》介绍了Python语言如何为管理uNIx和Linux服务器提供各种更加有效的任务处理方式。书中各章都提