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

面试题 相关文章推荐
JDO的含义
Nov 17 面试题
Java工程师面试集锦之Spring框架
Jun 16 面试题
输入一行文字,找出其中大写字母、小写字母、空格、数字、及其他字符各有多少
Apr 15 面试题
SQL Server笔试题
Jan 10 面试题
SQL里面IN比较快还是EXISTS比较快
Jul 19 面试题
什么是唯一索引
Jul 05 面试题
什么是ARP(Address Resolution Protocol)地址解析协议
Oct 31 面试题
一套软件测试笔试题
Jul 25 面试题
一套比较完整的软件测试人员面试题
May 13 面试题
某公司面试题
Mar 05 面试题
Java面向对象面试题
Dec 26 面试题
什么是ESB?请介绍一下ESB?
May 27 面试题
某科技软件测试面试题
May 19 #面试题
英智兴达软件测试笔试题
Oct 12 #面试题
新媒传信软件测试面试题
Feb 24 #面试题
数字天堂软件测试面试题
Dec 23 #面试题
施惠特软件测试面试题以及笔试题
May 13 #面试题
品恩科技软件测试面试题
Oct 26 #面试题
飞利信loadrunner和软件测试笔试题
Sep 22 #面试题
You might like
PHP 文件编程综合案例-文件上传的实现
2013/07/03 PHP
php5.2以下版本无json_decode函数的解决方法
2014/05/25 PHP
Adnroid 微信内置浏览器清除缓存
2016/07/11 PHP
php运行报错Call to undefined function curl_init()的最新解决方法
2016/11/20 PHP
PHP实时统计中文字数和区别
2019/02/28 PHP
ThinkPHP5.1框架页面跳转及修改跳转页面模版示例
2019/05/06 PHP
jQuery 相关控件的事件操作分解
2009/08/03 Javascript
28个JS验证函数收集
2010/03/02 Javascript
JS的反射问题
2010/04/07 Javascript
jQuery UI 实现email输入提示实例
2013/08/15 Javascript
Javascript倒计时页面跳转实例小结
2013/09/11 Javascript
Javascript排序算法之合并排序(归并排序)的2个例子
2014/04/04 Javascript
nodejs教程之环境安装及运行
2014/11/21 NodeJs
GitHub上一些实用的JavaScript的文件压缩解压缩库推荐
2016/03/13 Javascript
AJAX实现瀑布流触发分页与分页触发瀑布流的方法
2016/05/23 Javascript
JavaScript中捕获/阻止捕获、冒泡/阻止冒泡方法
2016/12/07 Javascript
javascript实现去除HTML标签的方法
2016/12/26 Javascript
JavaScript中的遍历详解(多种遍历)
2017/04/07 Javascript
layer.close()关闭进度条和Iframe窗的方法
2018/08/17 Javascript
Vue实现table上下移动功能示例
2019/02/21 Javascript
解决vue-cli 打包后自定义动画未执行的问题
2019/11/12 Javascript
nodejs制作小爬虫功能示例
2020/02/24 NodeJs
python代码检查工具pylint 让你的python更规范
2012/09/05 Python
Python中exit、return、sys.exit()等使用实例和区别
2015/05/28 Python
详解Python中的array数组模块相关使用
2016/07/05 Python
Python简单的制作图片验证码实例
2017/05/31 Python
[原创]Python入门教程4. 元组基本操作
2018/10/31 Python
python linecache 处理固定格式文本数据的方法
2019/01/08 Python
CSS3 Notes: -webkit-box-reflect实现倒影的实例
2016/12/08 HTML / CSS
瑞典时尚服装购物网站:Miinto.se
2017/10/30 全球购物
护士进修自我鉴定
2014/02/07 职场文书
工程专业求职自荐书范文
2014/02/08 职场文书
家居装修公司创业计划书范文
2014/03/20 职场文书
党员评议表自我评价范文
2014/10/20 职场文书
工程资料员岗位职责
2015/04/13 职场文书
vue项目两种方式实现竖向表格的思路分析
2021/04/28 Vue.js