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
《金一南讲:世界大格局,中国有态度》内容简介:“深刻而透彻地了解世界,也是一种力量的象征。”高层智囊金一南犀利开讲,首度解
《Go语言学习指南:惯例模式与编程实践》内容简介:本书Go语言正在迅速成为构建Web服务的优选语言。本书很好地阐述了Go语言的特性,
OpenGL ES 3.x游戏开发-(下卷) 本书特色 本书共分14章,内容涵盖了从OpenGL ES 3.x着色器的使用技巧到高级光影效果以及物理模拟问题的解...
《降低税负》内容简介:纳税筹划是纳税人的一项基本权利,而偷税、漏税、抗税、逃税等则是纳税人的非法应对手段。本书立足新的税收
《通信十年》内容简介:《通信十年:拥抱互联网》从人才、资源、创新三个维度,通过多年的连续新闻报道,试图阐释此前中国电信运营
本书是一本与众不同的Java入门好书。作者以独特的视角,向Java初学者讲述了如何才能真正理解和掌握Java语言。本书充分考虑了初学
本书是有关软件需求的经典教材,本书全面而深入地讲述了软件开发中一个至关重要的问题——软件需求问题。软件开发人员及用户往往
ApplesiPhoneandiPodTouchnotonlyfeaturetheworldsmostpowerfulmobileoperatingsystem...
《数字经济与数字货币》内容简介:数字经济正加速向经济运行的每个细节渗透,带来一场经济系统的变革,潜移默化地改变着经济运行的
《给孩子的24堂经典阅读课》内容简介:真正的好书,是读者喜欢阅读的;真正的经典,是读者反复阅读的。但是如何让孩子发现经典和好
《中国哲学创新方法论研究》内容简介:中国哲学学科自20世纪初依西方哲学范式建成以来,始终面临着方法论的困境,无论是在概念创造
本书通过案例分析、图片、插画,以一种独特的、吸引人的、出乎意料的方式诠释了成功的视觉营销活动。本书详细讲解了如何通过在线
这是一部色彩理论和实际应用的通用指导,为艺术家和设计师提供一系列的色彩概念,条理清晰,简单易懂。斯蒂芬·潘泰克和理查德·
KH10067 Photoshop CS5影像圣经 本书特色 本书编写的目的,是为读者解析经典软件photoshop的使用方法,提供操作上的重点和难点信息,实战...
Weallwantpeopletodostuff.Whetheryouwantyourcustomerstobuyfromyou,vendorstogiveyo...
《5G+智慧交通》内容简介:本书系统地呈现了智慧交通产业的发展概况、技术应用与典型场景,全面阐述了5G、AI、边缘计算、大数据等新
《生活中的运筹学》内容简介:为了帮助对运筹学感兴趣的读者掌握最基础也最实用的运筹方法,本书分10章阐述了运筹学中最基本的思想
揭示数字化主流大趋势的最新权威论著《主流》作者的最新力作!与法国秋季新版同步上市!面对数字化时代的到来,美国、欧盟、中国
《八万里路云和月》内容简介:全书共分为三篇。上篇“通榆‘触网’之路”,作者以半自传的形式回顾了通榆电商品牌成长历程。从零开
為什麼愈簡單的設計反而顯得愈奢侈?大量生產的蘋果電腦,為什麼像是為個人量身訂做的?史塔克最精采的設計作品不是外星人榨汁機