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面试题及答案-填空题
Apr 26 面试题
怎样创建、运行java程序
Aug 01 面试题
求网格中的黑点分布
Nov 06 面试题
C语言面试题
Oct 30 面试题
编写strcpy函数
Jun 24 面试题
不用游标的SQL语句有哪些
Sep 07 面试题
四川internet信息高速公路(C#)笔试题
Feb 29 面试题
介绍一下EJB的分类及其各自的功能及应用
Aug 23 面试题
Java中有几种类型的流?JDK为每种类型的流提供了一些抽象类以供继承,请说出他们分别是哪些类?
May 30 面试题
举例说明类变量和实例变量的区别
Jun 30 面试题
Weblogic和WebSphere不同特点
May 09 面试题
解释下列WebService名词:WSDL、SOAP、UDDI
Jun 22 面试题
某科技软件测试面试题
May 19 #面试题
英智兴达软件测试笔试题
Oct 12 #面试题
新媒传信软件测试面试题
Feb 24 #面试题
数字天堂软件测试面试题
Dec 23 #面试题
施惠特软件测试面试题以及笔试题
May 13 #面试题
品恩科技软件测试面试题
Oct 26 #面试题
飞利信loadrunner和软件测试笔试题
Sep 22 #面试题
You might like
玩转图像函数库―常见图形操作
2006/09/03 PHP
php中curl、fsocket、file_get_content三个函数的使用比较
2014/05/09 PHP
php获取url参数方法总结
2014/11/13 PHP
PHP操作Postgresql封装类与应用完整实例
2018/04/24 PHP
解决在laravel中leftjoin带条件查询没有返回右表为NULL的问题
2019/10/15 PHP
flexigrid 参数说明
2010/11/23 Javascript
VBS通过WMI监视注册表变动的代码
2011/10/27 Javascript
window.onload使用指南
2015/09/13 Javascript
jQuery+Ajax实现无刷新分页
2015/10/30 Javascript
浅谈JavaScript前端开发的MVC结构与MVVM结构
2016/06/03 Javascript
利用JQuery操作iframe父页面、子页面的元素和方法汇总
2017/09/10 jQuery
基于JavaScript中标识符的命名规则介绍
2018/01/06 Javascript
详解jQuery中的easyui
2018/09/02 jQuery
JS实现图片拖拽交换效果
2018/11/30 Javascript
layui table 列宽百分比显示的实现方法
2019/09/28 Javascript
vue组件传值的实现方式小结【三种方式】
2020/02/05 Javascript
浅析JavaScript 函数柯里化
2020/09/08 Javascript
python使用append合并两个数组的方法
2015/04/28 Python
Python字典实现简单的三级菜单(实例讲解)
2017/07/31 Python
Python使用pyautogui模块实现自动化鼠标和键盘操作示例
2018/09/04 Python
在python 中实现运行多条shell命令
2019/01/07 Python
python多个模块py文件的数据共享实例
2019/01/11 Python
keras 特征图可视化实例(中间层)
2020/01/24 Python
完美解决keras保存好的model不能成功加载问题
2020/06/11 Python
python如何建立全零数组
2020/07/19 Python
button在IE6/7下的黑边去除方案
2012/12/24 HTML / CSS
CSS实现聊天气泡效果
2020/04/26 HTML / CSS
美国非常受欢迎的Spa品牌:Bliss必列斯
2018/04/10 全球购物
什么是重载?CTS、CLS和CLR分别做何解释
2012/05/06 面试题
Windows和Linux动态库应用异同
2016/07/28 面试题
初中班主任寄语
2014/04/04 职场文书
违反单位工作制度检讨书
2014/10/25 职场文书
2015年“我们的节日·中秋节”活动总结
2015/07/30 职场文书
Python爬取科目四考试题库的方法实现
2021/03/30 Python
MutationObserver在页面水印实现起到的作用详解
2022/07/07 Javascript
uniapp引入支付宝原生扫码插件步骤详解
2022/07/23 Javascript