python unittest框架
四个部分:
test fixture
A test fixture represents(代表) the preparation needed to perform one or more tests, and any associate cleanup actions. This may involve, for example, creating temporary or proxy databases, directories, or starting a server process.
test case
A test case is the individual(独立的) unit of testing. It checks for a specific response to a particular set of inputs. unittest provides a base class, TestCase, which may be used to create new test cases.
test suite
A test suite is a collection of test cases, test suites, or both. It is used to aggregate(集合) tests that should be executed together.
test runner
A test runner is a component which orchestrates(安排) the execution of tests and provides the outcome to the user. The runner may use a graphical interface, a textual interface, or return a special value to indicate the results of executing the tests.
python unittest框架的更多相关文章
- python+unittest框架第一天unittest之简单认识Test Fixure:测试固件【8月17更新】
20万的慢慢会实现的吧,hhh unittest框架,我就不在介绍了,百度有很详细的介绍. 我们只要了解: 1.unittest是单元测试框架 2.它提供用例组织与执行:在实际工作中案例可能有上百条, ...
- python+unittest框架整理(一点点学习前辈们的封装思路,一点点成长。。。)
预期框架整理目标: 1.单个用例维护在单个.py文件中可单个执行,也可批量生成组件批量执行 2.对定位参数,定位方法,业务功能脚本,用例脚本,用例批量执行脚本,常用常量进行分层独立,各自维护在单独的. ...
- python unittest框架装饰器
要说单元测试和UI自动化之间的是什么样的一个关系,说说我个人的一些心得体会吧,我并没有太多的这方面经验,由于工作本身就用的少,还有就是功能测试点点对于我这种比较懒惰的人来说,比单元测试复杂...思考单 ...
- python unittest框架理解与总结(二)
unittest基本原理: ♦整个平台的搭建使用的是python的unittest测试框架,这里简单介绍下unittest模块的简单应用. ♦unittest是python的标准测试库,相比于其他测试 ...
- python unittest框架中addCleanup函数详解
接上一篇doCleanups说明,这次介绍下另一个很好用的函数:addCleanup 还是老规矩,看官方文档说明: addCleanup(function, *args, **kwargs)¶ Add ...
- python+unittest框架第六天unittest之优化测试报告
今天的内容主要是,用第三方的HTMLRUNner 第三方的报告来优化之前第五天批量执行案例的测试报告.案例的部分看第五天的批量执行笔记~ HTMLRUNner他可以生成更美观的测试报告,基于前辈造的车 ...
- python unittest 框架添加测试用例及运行
找出要测试的testcase,并加入到Testsuite,运行Testsuite并把结果给TestResult1.创建TestSuite实例对象suite = unittest.TestSuite() ...
- python unittest框架中doCleanups妙用
偶看unittest官方文档中,发现一个很好用的功能函数doCleanups,看看官方是怎么解释的: doCleanups() This method is called unconditionall ...
- python+unittest框架第二天unittest之简单认识Test Suite:测试套件
今天了解下测试套件Test Suite,什么是测试套件,测试套件是由多个Test Case测试用例组成的,当然也可以由多个子测试套件组成. 接下来看下如果构建测试套件,构建测试套件的方法: 1.用un ...
随机推荐
- Python随笔--继承
- 关于Django的配置
一. 下载与安装Django 登录Django的官网,https://www.djangoproject.com/download/,在网页的左边有下载压缩包,下载后解压在py ...
- select下拉列表js操作兼容性问题分享
做一个下拉列表鼠标移入改变对应的图片的值, $("select").mosover(function(){ //var i=$(this).find("selected& ...
- selenium+python启动浏览器出错,安装浏览器驱动
WebDriver 支持 Firefox (FirefoxDriver).IE (InternetExplorerDriver).Opera (OperaDriver) 和 Chrome (Chrom ...
- java集合(一)
- Shell 有类型变量
1.通过 declare 和 typeset 命令 declare 和 typeset 两者等价 declare 和 typeset 都是用来定义变量类型的 下面以 declare 进行总结 2.de ...
- zabbix添加IIS网站计数器(并发连接数)详解
环境:windows server 2012 前提:IIS上要添加好配置 1,在被监控主机,powershell输入perfmon.msc 2,点击添加按钮 3,在下拉菜单中点击小箭头 ...
- IDEA Maven项目默认编译器使用JDK1.5的解决办法
在idea中创建maven项目,项目指定用jdk1.8编译,每次更新maven库后,都会重新变成1.5.解决方案: 第一种: 在pom文件中,增加如下代码: <properties> &l ...
- Activity简说
Activity 四个状态 running 运行:前台显示,当前焦点 paused 暂停:上面被其他activity覆盖,有一部分可见 stopped 停止:被其他activity完全覆盖,不可见 d ...
- ajax请求,函数外无法获取请求的数据问题解决
一.开发中遇到需要通过ajax请求获取其他函数能否执行的状态,但是当赋值给statusFlag时发现无法赋值:ajax请求默认为异步的方式,该请求的操作被放置在任务队列中,并不会按顺序执行,所以被赋值 ...