python 几种常见的测试框架
1. unittest
参考文档: https://docs.python.org/3/library/unittest.html
The unittest unit testing framework was originally inspired by JUnit and has a similar flavor as major unit testing frameworks in other languages. It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the reporting framework.
跟 JUnit类似。
2. unittest2
参考文档: https://pypi.python.org/pypi/unittest2
unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7 and onwards.
unittest2 是一个针对 unittest测试框架新特性的补丁。
3. pytest
参考文档:http://pytest.org/latest/
unittest is the Python standard library testing framework. It is sometimes known as PyUnit and has a rich heritage as part of the xUnit family of testing libraries.
也就是说 pytest 就是 unittest。
4. nose
参考文档: https://nose.readthedocs.org/en/latest/
基于Python的测试驱动开发实战 也有nose的用法: http://python.jobbole.com/81305/
nose extends unittest to make testing easier.
nose扩展了unittest,从而使得测试更容易。
5. doctest
参考文档:https://docs.python.org/3/library/doctest.html
Python 各种测试框架简介(一):doctest http://my.oschina.net/lionets/blog/268542
The doctest module searches for pieces of text that look like interactive Python sessions, and then executes those sessions to verify that they work exactly as shown.
doctest模块会搜索那些看起来像交互式会话的 Python 代码片段,然后尝试执行并验证结果。
最新文章
- C++服务器开发之笔记三
- hibernateTemplate中常用查询方法的使用(原文地址: http://dongruan00.iteye.com/blog/1772311)
- codeforces 515C. Drazil and Factorial 解题报告
- Week,Month, Year 日期区间辅助类
- [LeetCode]题解(python):104 Maximum Depth of Binary Tree
- nginx 偶发 403原因
- NYOJ16 矩形嵌套(DAG最长路)
- [转载]为什么我希望用C而不是C++来实现ZeroMQ
- shell 学习笔记
- Qt中使用QProcess备份和恢复Mysql数据库
- VC++获取网卡MAC、硬盘序列号、CPU ID、BIOS编号
- 网页搜索功能 多表搜索sql
- js的水仙花数的输出
- 2^x mod n = 1(hd1395)
- java学习之jdbc的封装
- android 图形图像
- CSS常见布局问题整理
- ECSHOP后台登陆后一段时间不操作就超时的解决方法
- G - Line of Sight
- 3.0-uC/OS-III简介(操作系统结构)