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
《醉鲨》内容简介:★“荣获挪威最重要的文学奖——伯瑞格文学奖 (The Brage Prize),至今在挪威畅销不衰。★一部精彩绝伦的北欧探
Arduino不仅仅是全球最流行的开源硬件,也是一个优秀的硬件开发平台,更是硬件开发的趋势。Arduino简单的开发方式使得开发者更关
《旅行者的梦》内容简介:本书是作者以《旅行者的梦》一诗有感而发创作的乐队作品。在我国这部作品是首次出版。作品于2016年进行世
如何让你的iPad或者iPhone应用在AppStore中出类拔萃?许多书籍单纯从技术方面来探究苹果应用的设计和开发,而本书在探究这些问题
本书以敏捷软件开发为中心,系统阐述了敏捷原则和实践的先进理念和重要意义,并分别讲解了Scrum、极限编程、精益和看板四套敏捷实
《历史名镇:锦溪镇》内容简介:锦溪古镇,位于江苏省昆山市西南隅,因镇内一条彩若锦带的小溪而得名。锦溪素有“人文之乡”“生态
PRO\engineer wildfire4.0手动分模及模具设计技术解析(附光盘) 本书特色 《Pro/Engineer Wildfire 4.0手动分模及模...
《写给大忙人看的Java核心技术》为经典著作CoreJava作者CayS.Horstmann的全新力作,以关键的核心技术为着眼点,以全局高度提炼语
《2024年MBA、MPA、MPAcc、MEM管理类联考综合能力逻辑历年真题分类精解》内容简介:本书针对逻辑题型,深入分析探究,用“举题型讲
"Itsnotjustwhatitlookslikeandfeelslike.Designishowitworks."-SteveJobsTheresanewr...
《经典里的中国(全新修订版)》内容简介:不读经典,也能活得好好的,但问题是,“活得好好的”意味着什么? 《诗经》《论语》《庄
《胡小闹日记升级经典版·学习篇:再见:马虎和拖拉》内容简介:号外,号外! 五(三)班新转来一位“电线杆”——好高、好帅的体校
《工业互联网综合知识读本》内容简介:工业互联网作为新一代信息通信技术与制造业深度融合的产物,日益成为新一轮工业革命的重要基
《人生谁能无补丁》内容简介:作为著名散文家和学者,梁衡先生曾说,人生不如意事常八九,有低谷、叹息、哭泣与遗憾,但这就是人生
《从平面到立体:设计师必备的折叠技巧》在把诸如织物、纸板、塑料、金属等二维片材制作成三维形态时,许多设计师都会采用折叠这一
5所世界著名设计学府:哈佛大学、哥伦比亚大学、库珀联盟、麻省理工学院、宾夕法尼亚大学,5个精彩纷呈的故事。学习设计到底是追
《古城卫士:阮仪三传》内容简介:沧桑平遥、风情丽江、烟雨周庄、古雅苏州、水墨乌镇……都是因为一位老人的守护,其最初样貌与生
计算机网络的发展正改变着整个社会,这种改变影响了人们的工作、生活和受教育的方式,甚至渗透到我们每个人的行为中。网络已成为
《江山如画:中国古代山水志》内容简介:当我们经常顺口诵读《滕王阁序》《岳阳楼记》《前赤壁赋》等名篇的时候,你可曾想过彼时彼
《365夜故事:夏》内容简介:《365夜故事》是由鲁兵先生专为孩子编选的“国宝级”童书。以孩子的视角为选择眼光,以儿童的口语来裁