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
《整体养育》内容简介:孩子胆小、没有安全感,怎么办?孩子爱发脾气,怎么办?孩子注意力不集中,怎么办?……我该如何养育我的孩
《计算机科学概论》由两位知名的计算机科学教育家编写,全面而细致地介绍了计算机科学的各个方面。书中,计算系统的每个分层都以
《SQL基础教程(第3版)》是一本SQL的入门书,介绍如何使用最常用的SQL语言维护和查询数据库信息。书中介绍了各种DBMS,关系模型理
ThisisacomprehensiveaccountofthesemanticsandtheimplementationofthewholeLispfamil...
电子商务网站建设与管理 本书特色 《电子商务网站建设与管理》特色:遵循“理论够用、注重应用”原则,把培养学生的动手能力与岗位实践能力放在首位,注重实际项目开发能...
本书介绍日本著名企业(品牌)从产品策划、构思、创意、设计(草图、电脑模型、样机、模型)到产品的全过程,包括对人体工程学、
《大型IT系统性能测试入门经典》内容简介:《大型IT系统性能测试入门经典》是一本来自性能测试实战领域的专家作品,主要用来指导性
Series60智能手机开发平台正掀起新一轮的移动服务浪潮。超过60%的手机生产商获得了Series60平台的授权。Series60移动应用开发平
《多学科视域中的MOOC研究》内容简介:《MOOCs:理论与实践》面向人才培养实践需求,将MOOCs学习、开发、运行与管理融为一体,不仅
《电影与抗战》内容简介:本书为中国电影史研究专著,以十四年抗战期间电影的发展为整体考察对象,贯穿起局部抗战和全面抗战时期电
《绅权与国家权力关系研究:从明清到民初》内容简介:从乡村权力结构角度研究绅权与国家权力的关系,这不仅是一个法律史学问题,同
以用户为中心的时代,应用的界面外观变得越来越重要。然而,很多程序员都缺乏美术功底,要开发出界面美观的应用实属不易。ExtJS的
《轻松学拼读:小学英语拼读入门教程》内容简介:本书以字母拼读体系化学习为目标,以26个字母识读和元音字母、元音字母组合、辅音
《生活体验研究》旨在介绍如何从事现象学实践和写作。马克斯·范梅南在书中推出了在教育学和与人相关的诸如心理咨询、护理、卫生
《AutoCAD 2018实用教程(第5版)》内容简介:本书介绍了AutoCAD 2018的基本内容、使用方法和绘图的技能技巧。主要内容有:AutoCAD
《PHP+MySQL程序设计实例讲座》以深入浅出的讲解引导您熟悉PHP的语法,针对文件访问、GD绘图与图片处理、表单、Cookie、Session、
《算法精粹》内容简介:本书是一本面向中高级程序员的算法教程,借助Python语言,用经典的算法、编码技术和原理来求解计算机科学的
内容介绍———————————————————————————帮助读者认识并发展自身的创造力为着眼点。作者从过去的实验和
《农业互联网》内容简介:如果说互联网正在改变我们身边的一切,那么,10万亿规模的整个大农业将因互联网而迎来一场影响深远的变革
本书在简要介绍模拟通信原理的基础上,以数字通信原理为重点,讲述通信系统的组成、性能指标、工作原理、性能分析和设计方法。对