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
内容简介:对抗软件盗版、篡改和恶意逆向工程的理论、技巧和工具近十年来,人们在软件防盗版和防篡改技术的研发上取得了重大进展
细说AJAX与jQuery 本书特色 本书主要学习JavaScript中两个**的知识点:*个为AJAX,它是客户端JavaScript与后端服务器进行交流的一...
《Flutter实战指南》内容简介:本书针对零基础的读者,循序渐进地讲解如何通过Flutter构建一个完整的、跨平台的App,让读者通过边学
《曾国藩家书》内容简介:本书辑录了曾国藩在清道光30年至同治10年前后达30年的翰苑和从武生涯的书信一百六十余篇。家书涉及的内容
《中信国学大典:颜氏家训》内容简介:南北朝时,《颜氏家训》问世,从此受到历代人们的推崇。宋代晁公武称《颜氏家训》:“述立身
《成吉思汗:意志征服世界》内容简介:他曾4次差点饿死、3次被追杀亡命、2次全军覆没、3次众叛亲离,但每次他都在绝境中爆发出疯狂
现代通信原理分上、下两册,本书是上册,主要介绍通信的基本原理、分析方法及信号传输系统。本书共7章,内容包括绪论、预备基础知
《《红楼梦》真相(上、下)》内容简介:“满纸荒唐言,一把辛酸泪。都云作者痴,谁解其中味?”这是《红楼梦》的第一首标题诗。曹
《格言联璧》内容简介:本书是清人金缨辑录的一部格言集成。金缨,字兰生,清朝道光、咸丰时人,他遍览群书,凡遇名言佳句便记录下
《看电影,学历史》内容简介:《荒野猎人》中小李子舍命捕猎的海狸,是昙花一现的时尚风潮,也是北美殖民地早期的经济命脉?《和食
Buildingonthesuccessofitsstorefrontandfulfillmentservices,Amazonnowallowsbusines...
《深入RabbitMQ》内容简介:本书对RabbitMQ这一业界主流的消息中间件做了全面介绍,给出了如何使用RabbitMQ构建消息通信系统的方法
《XML完全探索》是完全根据读者的需要而设计的,书中有大量实际的XML场景。是一本尽可能深入地阐述XML的书籍,与其他XML书籍不同
《jQuery高级编程》从开发人员的层次对iQuery提供了一个全面的介绍。另外还深入介绍了iQuery的很多高级特性。在《jQuery高级编程
本书是日本平面设计师小矶裕司在自己所参与的设计项目过程中,对设计理念、设计执行所发出的诚恳思考。全书分为三大篇章,分别介
易飞、余刚、何凌、朱威编著的这本《GPRS网络信令实例详解》系统而全面地介绍了GPRS网络的系统架构以及以信令为主线的各接口协议
在今天不可持续的商品社会,人们购买到渴望已久的商品,只是短暂的使用,就迅速地丢弃然后又去寻求新的,消耗和浪费疯长,进而失
《四级词汇帝国(第二版)》内容简介:本书有别于其他词汇书的亮点是编排方式:书中每一个词条单词后面会有音标和记忆次数,每记忆
《深入实践C++模板编程》内容简介:C++模板编程领域的经典著作,由资深C++开发工程师撰写。本书以透彻分析原理为前提,深入讲解了模
UserexperiencedesignisthedisciplineofcreatingausefulandusableWebsiteorapplicatio...