《Test-Driven development By Example》阅读(一)

SQ3R阅读法:
 
一、Survey(阅读前的调查)
 
    1、书名:《Test-Driven development By Example》,中文译名《测试驱动开发实例》。
    2、作者:Kent Beck(肯特·贝克),美国著名软件工程师与作家,在软件工程方面有很大的贡献。他是Smalltalk软件的开发者,设计模式的先驱,测试驱动开发的支持者,也是极限编程的创始者之一。现在Facebook工作。
       维基百科摘录:
             Beck全家似乎都弥漫着技术的味道。生长在硅谷, 有着一个对无线电痴迷的祖父,以及一个电器工程师父亲。从小就引导Kent Beck成为了业余无线电爱好者。在俄勒冈州大学读本科期间,Kent Beck就开始研究起模式。然而在他最终拿到计算机学位之前,他却是在计算机和音乐中交替学习。似乎Java大师都能够有这样的能耐,另一Java大牛Rod Johnson同样也拥有音乐学的博士学位。 Kent Beck一直倡导软件开发的模式定义。早在1993年,他就和Grady Booch(UML之父)发起了一个团队进行这个方面的研究。虽然著有了《Smalltalk Best Practice Patterns》一书,但这可能并不是Kent Beck最大的贡献。他于1996年在DaimlerChrysler启动的关于软件开发的项目,才真正地影响后来的软件开发。这次的杰作就是XP(极限编程)的方法学。和软件开发大师Martin Fowler合著的《Planning Extreme Programming》可谓是关于XP的奠基之作。从此,一系列的作品如《Test Driven Development: By Example》,《Extreme Programming Explained: Embrace Change》让更多的人领略到了极限编程的精髓,也逐步导致了极限编程的流行。Kent Beck的贡献远不仅如此。对于众多的Java程序员来说,他和Erich Gamma共同打造的JUnit,意义更加重大。也许正式这个简单而又强大的工具,让众多的程序员更加认可和信赖极限编程,从而引起了Java敏捷开发的狂潮吧。
 
二、Questions(提出问题)
1、极限编程(XP)、敏捷编程(Agile)、测试驱动开发(TDD)的区别与联系?
    TDD在XP中处于核心地位,想要采用极限编程(XP),必须熟练掌握测试驱动开发技术(TDD)。
 
2、什么才叫测试驱动开发(TDD)?
    以测试作为开发过程的中心,它要求在编写任何产品代码之前,首先编写用于定义产品代码行为的测试。
 
3、测试驱动开发(TDD)真的有用吗?
    要让测试可行,需首先进行设计!(至少根据blog内容)
 
三、Read(阅读全书)
前言
1、 clean code that works!——TDD一直追逐的目标
 
2、如何做才能做到clean code that works?—— TDD开发的两大原则
    (1)只有在测试失败时,才重新写代码!
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1.敏捷开发强调测试先行,因为先编写测试代码,就可以有目的的预防某些bug的产生,要知道,治病不如预防!!!所以我个人觉得这个还是比较重要的,文件也不大,只有8M,但是高清。 2.本版本与网上其他资源不同之处在于,此版本可进行编辑,搜索,已进行内容识别扫描。可全选,可编辑,可剪切文字。 部分目录如下: 目录 第一部分资金实例 第1 章多币种资金··························································································································3 第2 章变质的对象························································································································10 第3 章一切均等····························································································································13 第4 章私有性·································································································............................... 16 第5 章法郎在诉说........................................................................................................................ 18 第6 章再谈一切均等.................................................................................................................... 21 第7 章苹果和桔子........................................................................................................................ 25 第8 章制造对象····························································································································27 第9 章我们所处的时代................................................................................................................ 31 第10 章有趣的Times 方法.…....….. …... …..... ….. ….... …... ….. ……….... …... ….. …….... ……... ……...... 36 第11 章万恶之源.......................................................................................................................... 41 第12 章加法,最后的部分..…..….. ….... …... ….... …..... …... ….. ….. …..... ….. …... …....... ……………· ….. 44 第13 章完成预期目标.................................................................................................................. 48 第14 章变化.................................................................................................................................. 53 第15 章混合货币.......................................................................................................................... 57 第16 章抽象,最后的工作.......................................................................................................... 61 第17 章资金实例回顾.................................................................................................................. 65 . 下一步是什么? •••••••••••·••••••••• 暹···········…...... 匿·…... …......... 霉.........…········· 暹....….. 查......................... 65 比喻66 JUnit 的向.法::::::::::::鲁....愈::::::::::::::::::::::::::::::::::::::::::::::::::::董:::::::::::::::::::::::::::::::::::::::::::::::::::::::66 代码统计.......................................... 夔················…................................................................ 麟..... 67 过程............................................................................................................................................ 68 了:回顾::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 第二部分xUnit 实例 第18 章步入xUnit ......................................... 簪.........…......... …....... ….... …..................................... 73 第19 章设置表格··················--.. ·········.. ··••• 暹........... 薹··································"······"·····…................... 77 第20 章后期整理................. 畛················............................................................ 爹...参................….... 80 第21 章计数.......................................................................................…................................... ….. 83 第22 章失败处理.......................................…... 窜........….. ….............................. ….. ….... …............... 86 第23 章如何组成一组测试...........雪…………………..………………………………………….. 霞...…………….. 88 第24 章xUnit 回顾.............雪...... 暹........... 匿········ 摹…················--雹............ …............ 霉….........…............. 93 第三部分测试驱动开发的模式 第25 章测试驱动开发模式会....................…........... 吻.....……..... ……....... 诊....………………………......... 97 测试(名词)暹.雪.... 雪......................…......................................... 崎................................................. 97 相互独立的测试(Isolated Test) ……..... …·…….......... …………………………...... …………….... 雀..... 98 测试列表(Test List) ................................................... 豪....................…..... …........................... 99 测试优先(Test First) 断言优先 (Assert First;·::::::::::::::::::::::二 ::::::::::::::::::::神: ....:::...:.......二二厂::::厂厂 100 101 测试数据(Test Data) .显然数据(Evident Dat~·;··:::::::::::::::::::::::::::::::::::::: 二二:::::::::::::::::::::::::::::::::::::::::::…::::: 102 103 第26 章不可运行状态模式104 一步测试(One Step Test)··:::::::::: 二:....:..:墓:::::::二:厂二二二::::::::::: 二勹二二::..二二:: 104 启动测试(Starter Test) ................................... 金.......…·······....................... 渗........................... 105 说明测试<Explanation Test) 106 学习测试(Leaming Test) .... 二二二二二二二二二二二二二二二二二二二二二二二: 106 另外的测试 回归测试(;~鲁酝已卢;比~~;噜:::::::::::::: 二..二:.:二二二二二二:.二:::::::::::::::::::::::::::: 108 107 ::开 闷:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::缴:惫:::::::::: 便宜的桌子,舒适的椅子…………........……·…………………· ……………..... …………………………... 110 第27 章测试模式................…........ ….......................... 愈............................................................... 111 子测试(Child Test) .......... 筝.............….................................... 噙.............................................. 111 模拟对象(Mock Object) . …...... 摹.......………………·……………………………………………………· …111 :::1言lf(:n~~~~·;···::::::::::二::::::::::::::::::::::::::::::::::::::::::::::: 二::.二:.:.. :::....}}: 清扫割试死角(Crash Test Dummy) . ……... ………· ……………... ……….. …………......... …….. ….. 114 昙需它需心为芯芯;沁五::::::::::::::::::::::::::::::::::::睿 ......查::::::::::::::::::::::::::::::::::::::::::: :~! 第2~伪!:~昙,~:动了二::.二:./.二:.二二二:...::二二:/二三:.靡:...二::::::::::::::::: !!; 三角法(Triangulation) .... 暹........ 参...................................................................佛....................... 119 显明实现(Obvious Impl ementatlon) ….................... 拳...............................…......................... 119 从一到多(One to Many) ........................................ …....... 匿.............….................................. 120 第29 章xUnit 模式 断言 (Assertion).. 二二二.二二二::::.二:::::::::::::::::::::::::看 :.:..令::::::::::::::::::::::::::::::::::::::: 122 122 固定设施(Fixture) ............................................................................................................... 123 ;古婴:哼宁:st(贮笠:飞F~~~~~-~...:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ~ 芦 异常测试(Exception Test) . …... ……....... …....... ………... …............... 争............. …·鲁............. 令奄.... 127 全部测试(All Tests) ..................... 耄..令......................................... 伞......................................... 127 第 3~命:巴尸尸式..:. .::.: ..: :::.,二:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ;~~ 值对象簪............... 逾............................ 雪... 潭.................................................................................... 131 盓:去:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ~!! 插入式对象 插入式选择霹:::::: 二::::::::::::::::::::::令: ........:噜:::::::::::::::::::::::::::::::::::::::::::::::::::::::::135 134 工厂方法.................................... 参·········"···········...........................................噜..............….......... 137 递归:::::::::参::::::::::::::::::::::::::::::::::::::::::参:::::::::::::::::::::::::::::::::::睿...集:::::::::::::::::::::::::::::::: :~; 收集参数 单例模式亭~~-;心如~;--·::::::::二二:.二二二二二二二二二二二二二二:.. :.二:../...: 140 141 第31 章重构........................................................................................................................…..... 142 调和差异( Reconcile Differences) . …………………….. ……………………........ 萼..........……….. …... 142 隔离变化(Isolate Change) 帚...……………………........ …...... ……………... …………· …….. ………….. 143 :芯:亡::~!:~~==~;··::: 勹....勹勹:::::::二/..::/厂:.二:::::::::二二二二二二:..::::: ;芯之笘:芦::兄芯立立e)鲁·:参:.:.:.:食::::::::: 俺.. :..:二:::::::::::::::::::::::: 二:参:..二::::::::::::::: 二.::::..:芯 转移方法(Move Method) ………· ….. ……..... ……….... ………..... ………............. ………………....... 147 方法对象(Method Object) .. …………· ……….. ……………......... ……………….... …………………….. 148 添加参数(Add Parameter) …….. ….. ……………………………..... ……………..... ……………..... ….... 149 把方法中的参数转变为构造函数中的参数••• 重..............................................……....... …........ 149 第32 章掌握TDD ….....…….. ……..... ………….. ……………………...... ……………………………….. …... 夸... 150 附录沁尸尸严:::::::::::::::::::::::::::::::::睿 :.二:::::::::: 二:.:::二:.二:::.:.:::..::.::.:.::::.:..::::.二.:::::二二:.:::二腐 附录B 斐波纳契数列.…………·.........·….. …………....... ·······………….. 睿... 夸................. ….............. 食摩.. 164
How to develop, build, test, package, and release Eclipse plug-ins with features for Eclipse 3.x and Eclipse 4.x Overview Create plug-ins to extend the Eclipse runtime covering Eclipse 3.x and the changes required for Eclipse 4.x Plug-ins from design to distribution — wide coverage of the entire process No prior OSGi or Eclipse plug-in development experience necessary In Detail As a highly extensible platform, Eclipse is used by everyone from independent software developers to NASA. Key to this is Eclipse’s plug-in ecosystem, which allows applications to be developed in a modular architecture and extended through its use of plug-ins and features. "Eclipse Plugin Development by Example: Beginner's Guide" takes the reader through the full journey of plug-in development, starting with an introduction to Eclipse plug-ins, continued through packaging and culminating in automated testing and deployment. The example code provides simple snippets which can be developed and extended to get you going quickly. This book covers basics of plug-in development, creating user interfaces with both SWT and JFace, and interacting with the user and execution of long-running tasks in the background. Example-based tasks such as creating and working with preferences and advanced tasks such as well as working with Eclipse’s files and resources. A specific chapter on the differences between Eclipse 3.x and Eclipse 4.x presents a detailed view of the changes needed by applications and plug-ins upgrading to the new model. Finally, the book concludes on how to package plug-ins into update sites, and build and test them automatically. What you will learn from this book How to create plug-ins for Eclipse 3.x and 4.x and automatically test plug-ins with JUnit How to display tree and table information in views What are the specific differences between the Eclipse 3.x model and the Eclipse 4.x model How and when to build user interfaces from SWT and JFace How to run tasks in the background and update the user interface asynchronously How to build plug-ins, features and update sites with Maven Tycho and automate user interface tests with SWTBot How to store and obtain preferences, and how to integrate with the Preferences panel How to work with the Eclipse resources model for creating and updating files and reporting errors to the user Approach A Beginner's Guide following the "by Example" approach. There will be 5-8 major examples that will be used in the book to develop advanced plugins with the Eclipse IDE. Who this book is written for This book is for Java developers who are familiar with Eclipse as a Java IDE and are interested in learning how to develop plug-ins for Eclipse. No prior knowledge of Eclipse plug-in development or OSGi is necessary, although you are expected to know how to create, run, and debug Java programs in Eclipse. Product Details Paperback: 348 pages Publisher: Packt Publishing (June 20, 2013) Language: English ISBN-10: 1782160329 ISBN-13: 978-1782160328

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值