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两种查询函数array/row的区别
Jun 03 面试题
应用服务器有那些
Jan 19 面试题
Java和Javasciprt的区别
Sep 02 面试题
Java面试中常遇到的问题,也是需要注意的几点
Aug 30 面试题
C语言面试题
May 19 面试题
C/C++程序员常见面试题一
Dec 08 面试题
为什么如下的代码int a=100,b=100;long int c=a * b;不能工作
Nov 29 面试题
利用指针变量实现队列的入队操作
Apr 07 面试题
介绍一下SQL注入攻击的种类和防范手段
Feb 18 面试题
什么是URL
Dec 13 面试题
this关键字的作用
Jan 30 面试题
同步和异步有何异同,在什么情况下分别使用他们
Apr 09 面试题
某科技软件测试面试题
May 19 #面试题
英智兴达软件测试笔试题
Oct 12 #面试题
新媒传信软件测试面试题
Feb 24 #面试题
数字天堂软件测试面试题
Dec 23 #面试题
施惠特软件测试面试题以及笔试题
May 13 #面试题
品恩科技软件测试面试题
Oct 26 #面试题
飞利信loadrunner和软件测试笔试题
Sep 22 #面试题
You might like
多数据表共用一个页的新闻发布
2006/10/09 PHP
IP138 IP地址查询小偷实现代码
2010/02/15 PHP
php随机获取金山词霸每日一句的方法
2015/07/09 PHP
注意!PHP 7中不要做的10件事
2016/09/18 PHP
解决php extension 加载顺序问题
2019/08/16 PHP
jquery实现的元素的left增加N像素 鼠标移开会慢慢的移动到原来的位置
2010/03/21 Javascript
将光标定位于输入框最右侧实现代码
2012/12/04 Javascript
中止javascript执行的方法
2014/02/14 Javascript
JavaScript学习笔记之DOM基础 2.4
2015/08/14 Javascript
把普通对象转换成json格式的对象的简单实例
2016/07/04 Javascript
js动态添加的DIV中的onclick事件简单实例
2016/07/25 Javascript
教你用十行node.js代码读取docx的文本
2017/03/08 Javascript
create-react-app构建项目慢的解决方法
2018/03/14 Javascript
vue中当图片地址无效的时候,显示默认图片的方法
2018/09/18 Javascript
vue图片加载失败时用默认图片替换的方法
2019/08/29 Javascript
VUE 组件转换为微信小程序组件的方法
2019/11/06 Javascript
Python在Windows和在Linux下调用动态链接库的教程
2015/08/18 Python
python通过Windows下远程控制Linux系统
2018/06/20 Python
超简单使用Python换脸实例
2019/03/27 Python
Python 类的私有属性和私有方法实例分析
2019/09/29 Python
python 基于dlib库的人脸检测的实现
2019/11/08 Python
Python2.7:使用Pyhook模块监听鼠标键盘事件-获取坐标实例
2020/03/14 Python
Python接口自动化测试的实现
2020/08/28 Python
python 还原梯度下降算法实现一维线性回归
2020/10/22 Python
使用Python实现音频双通道分离
2020/12/25 Python
Python将QQ聊天记录生成词云的示例代码
2021/02/10 Python
英国的知名精品百货公司:House of Fraser(福来德)
2016/08/14 全球购物
意大利买卖二手奢侈品网站:LAMPOO
2020/06/03 全球购物
护理毕业生自荐信范文
2013/12/22 职场文书
党的群众路线教育实践活动批评与自我批评
2014/02/16 职场文书
向国旗敬礼活动总结范文2014
2014/09/27 职场文书
医院领导班子查摆问题对照检查材料思想汇报
2014/10/08 职场文书
2015年平安创建工作总结
2015/04/29 职场文书
2015年重阳节主持词
2015/07/04 职场文书
2015年七夕情人节感言
2015/08/03 职场文书
2016继续教育培训学习心得体会
2016/01/19 职场文书