Why do we need Unit test


Posted in 面试题 onJanuary 03, 2013
The test is the executable specification
Focus on the purpose first, then about the possible implementations
Understand the program‘s behavior by looking at the tests – the tests tell you more than an API description, they show the dynamics, how to use the API.
You develop just enough
You get to the goal as quick as possible
You don‘t develop unnecessary code
There is no code without a test
There is no test without a user requirement
Once you get one test working, you know it is working now and forever
You use the tests as regression tests
The tests give us the courage to refactor
You can prove that everything still works after the refactoring by simply executing the tests
Code quality – only code that is tested is checked into versioning system!
Well-written tests provide documentation on expected and unexpected use
Tests are fined grained – can be run independently
Tests can be aggregated easily
Which tests fail give you a hint of where a bug was introduced
Helps ensure you made a shippable product

Tags in this post...

面试题 相关文章推荐
实现strstr功能,即在父串中寻找子串首次出现的位置
Aug 05 面试题
C++:memset ,memcpy和strcpy的根本区别
Apr 27 面试题
汇智创新科技发展有限公司
Dec 06 面试题
中科创达面试题
Dec 28 面试题
北京鼎普科技股份有限公司软件测试面试题
Apr 07 面试题
软件测试面试题
Jan 05 面试题
企业面试题试卷附带答案
Dec 20 面试题
腾讯公司的一个sql题
Jan 22 面试题
请问软件开发中的设计模式你会使用哪些
May 13 面试题
JAVA程序设计笔试题面试题一套
Jul 28 面试题
解释i节点在文件系统中的作用
Nov 26 面试题
介绍一下javax.servlet.Servlet接口及其主要方法
Nov 30 面试题
百度软件工程师职位
Feb 14 #面试题
软件配置管理有什么好处
Apr 15 #面试题
中间件分为哪几类
Mar 14 #面试题
软件生产职位结构化面试主要考察要素及面试题库
Jun 12 #面试题
一套软件开发工程师笔试题
May 18 #面试题
软件工程师面试题
Jun 25 #面试题
UML设计模式笔试题
Jun 07 #面试题
You might like
基于HTTP长连接的"服务器推"技术的php 简易聊天室
2009/10/31 PHP
php实现登录tplink WR882N获取IP和重启的方法
2016/07/20 PHP
JQUERY 浏览器判断实现函数
2009/08/20 Javascript
js 分栏效果实现代码
2009/08/29 Javascript
ext jquery 简单比较
2010/04/07 Javascript
JS获取当前网页大小以及屏幕分辨率等
2014/09/05 Javascript
5个书写JavaScript代码的坏习惯,看看你中枪了没?
2014/11/06 Javascript
jQuery使用toggleClass方法动态添加删除Class样式的方法
2015/03/26 Javascript
浅谈javascript的Touch事件
2015/09/27 Javascript
移动端使用localStorage缓存Js和css文的方法(web开发)
2016/09/20 Javascript
Seajs是什么及sea.js 由来,特点以及优势
2016/10/13 Javascript
node前端模板引擎Jade之标签的基本写法
2018/05/11 Javascript
详解vue服务端渲染浏览器端缓存(keep-alive)
2018/10/12 Javascript
详解Vue内部怎样处理props选项的多种写法
2018/11/06 Javascript
JQuery搜索框自动补全(模糊匹配)功能实现示例
2019/01/08 jQuery
elementUI vue this.$confirm 和el-dialog 弹出框 移动 示例demo
2019/07/03 Javascript
5分钟教你用nodeJS手写一个mock数据服务器的方法
2019/09/10 NodeJs
vue transition 在子组件中失效的解决
2019/11/12 Javascript
vue的hash值原理也是table切换实例代码
2020/12/14 Vue.js
[01:01:42]Secret vs Optic Supermajor 胜者组 BO3 第二场 6.4
2018/06/05 DOTA
Python3解释器知识点总结
2019/02/19 Python
python输出电脑上所有的串口名的方法
2019/07/02 Python
Python 实用技巧之利用Shell通配符做字符串匹配
2019/08/23 Python
CSS3结构性伪类选择器九种写法
2012/04/18 HTML / CSS
推荐WEB开发者最佳HTML5和CSS3代码生成器
2015/11/24 HTML / CSS
驴妈妈旅游网:中国新型的B2C旅游电子商务网站
2016/08/16 全球购物
加拿大在线隐形眼镜专家:PerfectLens.ca
2016/11/19 全球购物
中国高端家电购物商城:顺电
2018/03/04 全球购物
红旗团支部事迹材料
2014/01/27 职场文书
安全大检查实施方案
2014/02/22 职场文书
文化活动实施方案
2014/03/28 职场文书
小班上学期幼儿评语
2014/12/30 职场文书
小学科学教学计划
2015/01/21 职场文书
2015年团队工作总结范文
2015/05/04 职场文书
农业项目合作意向书
2015/05/08 职场文书
MySQL表字段时间设置默认值
2021/05/13 MySQL