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

面试题 相关文章推荐
PHP解析URL是哪个函数?怎么用?
May 09 面试题
WebSphere 应用服务器都支持哪些认证
Dec 26 面试题
如何判断计算机可能已经中马
Mar 22 面试题
C#如何进行LDAP用户校验
Nov 21 面试题
一些Unix笔试题和面试题
Jan 22 面试题
介绍一下write命令
Aug 10 面试题
linux面试相关问题
Apr 28 面试题
解决方案设计综合面试题
Aug 31 面试题
介绍一下XMLHttpRequest对象的常用方法和属性
May 24 面试题
Java中各种基本数据类型的默认值都是什么
Dec 22 面试题
送给程序员的20个Java集合面试问题
Aug 06 面试题
JAVA软件工程师测试题
Jul 25 面试题
某科技软件测试面试题
May 19 #面试题
英智兴达软件测试笔试题
Oct 12 #面试题
新媒传信软件测试面试题
Feb 24 #面试题
数字天堂软件测试面试题
Dec 23 #面试题
施惠特软件测试面试题以及笔试题
May 13 #面试题
品恩科技软件测试面试题
Oct 26 #面试题
飞利信loadrunner和软件测试笔试题
Sep 22 #面试题
You might like
PHP中str_replace函数使用小结
2008/10/11 PHP
php读取mssql的ntext字段返回值为空的解决方法
2014/12/30 PHP
CI框架支持$_GET的两种实现方法
2016/05/18 PHP
PHP实现在对象之外访问其私有属性private及保护属性protected的方法
2017/11/20 PHP
JS判断两个时间大小的示例代码
2014/01/28 Javascript
js函数名与form表单元素同名冲突的问题
2014/03/07 Javascript
jQuery中children()方法用法实例
2015/01/07 Javascript
js实现的二级横向菜单条实例
2015/08/22 Javascript
详解javascript函数的参数
2015/11/10 Javascript
javascript插件开发的一些感想和心得
2016/02/28 Javascript
浅谈js和css内联外联注意事项
2016/06/30 Javascript
jQuery动态生成不规则表格(前后端)
2017/02/21 Javascript
layui type2 通过url给iframe子页面传值的例子
2019/09/06 Javascript
Vue+webpack实现懒加载过程解析
2020/02/17 Javascript
js实现直播点击飘心效果
2020/08/19 Javascript
selenium 反爬虫之跳过淘宝滑块验证功能的实现代码
2020/08/27 Javascript
vue+element实现动态加载表单
2020/12/13 Vue.js
python写入中英文字符串到文件的方法
2015/05/06 Python
python实现的MySQL增删改查操作实例小结
2018/12/19 Python
Python数据库小程序源代码
2019/09/15 Python
python3实现elasticsearch批量更新数据
2019/12/03 Python
Python3直接爬取图片URL并保存示例
2019/12/18 Python
动态设置django的model field的默认值操作步骤
2020/03/30 Python
python程序输出无内容的解决方式
2020/04/09 Python
马来西亚时装购物网站:ZALORA马来西亚
2017/03/14 全球购物
星空联盟C# .net笔试题
2014/12/05 面试题
swtich是否能作用在byte上,是否能作用在long上,是否能作用在String上?
2013/03/30 面试题
在校生钳工实习自我鉴定
2013/09/19 职场文书
个人近期表现材料
2014/02/11 职场文书
效能监察建议书
2014/05/19 职场文书
三下乡个人总结
2015/03/04 职场文书
未婚证明格式
2015/06/15 职场文书
《认识钟表》教学反思
2016/02/16 职场文书
2016年度师德标兵先进事迹材料
2016/02/26 职场文书
用React Native制作一个简单的游戏引擎
2021/05/27 Javascript
python中取整数的几种方法
2021/11/07 Python