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...

面试题 相关文章推荐
枚举和一组预处理的#define有什么不同
Sep 21 面试题
采用怎样的方法保证数据的完整性
Dec 02 面试题
如何转换一个字符串到enum值
Apr 12 面试题
程序集与命名空间有什么不同
Jul 25 面试题
网络技术支持面试题
Apr 22 面试题
北京某科技有限公司C# .net笔试题
Sep 27 面试题
接口的多继承会带来哪些问题
Aug 17 面试题
Python是如何进行类型转换的
Jun 09 面试题
如何反序的迭代一个序列?how do I iterate over a sequence in reverse order
Feb 04 面试题
腾讯公司的一个sql题
Jan 22 面试题
同步和异步有何异同,在什么情况下分别使用他们?
Dec 28 面试题
SOA的常见陷阱或者误解是什么
Oct 05 面试题
某科技软件测试面试题
May 19 #面试题
英智兴达软件测试笔试题
Oct 12 #面试题
新媒传信软件测试面试题
Feb 24 #面试题
数字天堂软件测试面试题
Dec 23 #面试题
施惠特软件测试面试题以及笔试题
May 13 #面试题
品恩科技软件测试面试题
Oct 26 #面试题
飞利信loadrunner和软件测试笔试题
Sep 22 #面试题
You might like
如何在PHP中使用Oracle数据库(6)
2006/10/09 PHP
微信支付开发告警通知实例
2016/07/12 PHP
php实现数组纵向转横向并过滤重复值的方法分析
2017/05/29 PHP
Laravel框架分页实现方法分析
2018/06/12 PHP
深入聊聊Array的sort方法的使用技巧.详细点评protype.js中的sortBy方法
2007/04/12 Javascript
跨浏览器开发经验总结(四) 怎么写入剪贴板
2010/05/13 Javascript
利用JS延迟加载百度分享代码,提高网页速度
2013/07/01 Javascript
父节点获取子节点的字符串示例代码
2014/02/26 Javascript
js中一维数组和二位数组中的几个问题示例说明
2014/07/17 Javascript
jquery右下角自动弹出可关闭的广告层
2015/05/08 Javascript
针对BootStrap中tabs控件的美化和完善(推荐)
2016/07/06 Javascript
js模式化窗口问题![window.dialogArguments]
2016/10/30 Javascript
bootstrap fileinput完整实例分享
2016/11/08 Javascript
微信小程序遇到修改数据后页面不渲染的问题解决
2017/03/09 Javascript
Bootstrap笔记之缩略图、警告框实例详解
2017/03/09 Javascript
Vue非父子组件通信详解
2017/06/12 Javascript
使用Vuex实现一个笔记应用的方法
2018/03/13 Javascript
如何检测JavaScript中的死循环示例详解
2020/08/30 Javascript
JS前端基于canvas给图片添加水印
2020/11/11 Javascript
python简单猜数游戏实例
2015/07/09 Python
python在html中插入简单的代码并加上时间戳的方法
2018/10/16 Python
Python批量删除只保留最近几天table的代码实例
2019/04/01 Python
python使用参数对嵌套字典进行取值的方法
2019/04/26 Python
flask框架蓝图和子域名配置详解
2020/01/25 Python
Python random模块制作简易的四位数验证码
2020/02/01 Python
Python 字节流,字符串,十六进制相互转换实例(binascii,bytes)
2020/05/11 Python
Python实现Word文档转换Markdown的示例
2020/12/22 Python
德国帽子专家:Hutshopping
2019/11/03 全球购物
物流仓管员岗位职责
2013/12/04 职场文书
司机检讨书
2014/02/13 职场文书
2014年元旦联欢会活动策划方案
2014/02/16 职场文书
教师自我剖析材料范文
2014/09/30 职场文书
如何起草一份正确的合伙创业协议书?
2019/07/04 职场文书
Python实战之疫苗研发情况可视化
2021/05/18 Python
Win11怎么解除儿童账号限制?Win11解除微软儿童账号限制方法
2022/07/07 数码科技
CSS list-style-type属性使用方法
2023/05/21 HTML / CSS