do you have any Best Practice for testing


Posted in 面试题 onJune 04, 2016
Test everything that you want to work
More test methods in your TestCase than in the class you are testing
Tests should be as fine grained as possible
Tests should be independent
Should not take long to run (a few seconds)
Easy to understand and read
Make them safe
Developers must know they are not destructive
All developers must know about them
Everyone who touches the code must run the tests.
Determines how much of your code is covered by tests
If developer changes functionality, they may need to update test
Warning: you’ve changed the interface. Did you break someone else?
Even better, all tests pass AND new tests were added for new code
All tests pass all the time
Don’t allow even one test the “always fails”
Track down and fix the broken test immediately
Automate running of tests
Ex. All tests on tip revision of code get run automatically once per day with failures emailed.
Run tests on code check-in
Run tests before deployment
Have a reasonable copy of your production environment in a dev area.

Tags in this post...

面试题 相关文章推荐
您熟悉ORM(Object-Relation Mapping)吗?请谈谈您所理解的ORM
Feb 08 面试题
Web Service面试题:如何搭建Axis2的开发环境
Jun 20 面试题
附答案的Java面试题
Nov 19 面试题
面向对象编程的优势是什么
Dec 17 面试题
在Java开发中如何选择使用哪种集合类
Aug 09 面试题
某公司Java工程师面试题笔试题
Mar 27 面试题
怎样建立和理解非常复杂的声明?例如定义一个包含N 个指向返回 指向字符的指针的函数的指针的数组?
Mar 19 面试题
abstract是什么意思
Feb 12 面试题
港湾网络笔试题
Apr 19 面试题
Python中pass语句的作用是什么
Jun 01 面试题
一道输出判断型Java面试题
Oct 01 面试题
如何通过jdbc调用存储过程
Apr 19 面试题
某科技软件测试面试题
May 19 #面试题
英智兴达软件测试笔试题
Oct 12 #面试题
新媒传信软件测试面试题
Feb 24 #面试题
数字天堂软件测试面试题
Dec 23 #面试题
施惠特软件测试面试题以及笔试题
May 13 #面试题
品恩科技软件测试面试题
Oct 26 #面试题
飞利信loadrunner和软件测试笔试题
Sep 22 #面试题
You might like
Syphon 秘笈
2021/03/03 冲泡冲煮
超强分页类2.0发布,支持自定义风格,默认4种显示模式
2007/01/02 PHP
发款php蜘蛛统计插件只要有mysql就可用
2010/10/12 PHP
值得分享的php+ajax实时聊天室
2016/07/20 PHP
php7连接MySQL实现简易查询程序的方法
2020/10/13 PHP
另一个javascript小测验(代码集合)
2011/07/27 Javascript
JS中批量给元素绑定事件过程中的相关问题使用闭包解决
2013/04/15 Javascript
使用BootStrap和Metroui设计的metro风格微网站或手机app界面
2016/10/21 Javascript
react实现pure render时bind(this)隐患需注意!
2017/03/09 Javascript
纯js实现页面返回顶部的动画(超简单)
2017/08/10 Javascript
JS计算两个时间相差分钟数的方法示例
2018/01/10 Javascript
H5+C3+JS实现双人对战五子棋游戏(UI篇)
2020/05/28 Javascript
JS div匀速移动动画与变速移动动画代码实例
2019/03/26 Javascript
vue-cli项目使用mock数据的方法(借助express)
2019/04/15 Javascript
javascript中的this作用域详解
2019/07/15 Javascript
约瑟夫问题的Python和C++求解方法
2015/08/20 Python
Python Web编程之WSGI协议简介
2018/07/18 Python
树莓派实现移动拍照
2019/06/22 Python
Python对wav文件的重采样实例
2020/02/25 Python
Python web如何在IIS发布应用过程解析
2020/05/27 Python
opencv 图像腐蚀和图像膨胀的实现
2020/07/07 Python
纯CSS3编写的的精美动画进度条(无flash/无图像/无脚本/附源码)
2013/01/07 HTML / CSS
会计电算化专业毕业生推荐信
2013/12/24 职场文书
文明风采获奖感言
2014/02/18 职场文书
《夕阳真美》教学反思
2014/04/27 职场文书
银行爱岗敬业演讲稿
2014/05/05 职场文书
我的中国梦口号
2014/06/16 职场文书
暑假安全教育广播稿
2014/09/10 职场文书
科学发展观演讲稿
2014/09/11 职场文书
申报材料格式
2014/12/30 职场文书
教师工作表现评语
2014/12/31 职场文书
2015年汽车销售工作总结
2015/04/07 职场文书
2015年企业员工工作总结范文
2015/05/21 职场文书
小学生必读成语故事大全:送给暑假的你们
2019/07/09 职场文书
Nginx的反向代理实例详解
2021/03/31 Servers
使用Spring处理x-www-form-urlencoded方式
2021/11/02 Java/Android