python测试框架总结

If you are a developer or tester using Python, you live in exciting, ebullient times. There are Python-based testing frameworks newly-announced or recently-updated almost every day. Here is a rundown of the latest I'm aware of: 如果你是一个python开发人员或者python测试人员,令人沸腾的时刻到来了。这里介绍了许多python测试框架,它们或是最新发布的或者是最近都在保持更新的。下面就是我所知道的一些框架的列表: Unit testing 单元测试
  • py.test: no recent new release, but changes are happening almost daily in svn
  • py.test:没有最近的新版本,但变化正在发生,几乎每天都在SVN.(目前最新的版本是2.2.0)
  • TestOOB: version 1.16 was released on 2009 (TestOOB is an enhancement to the standard unittest module, offering many features that py.test offers)
  • TestOOB:1.16版本发布于2009,以后没有更新。TestOOB是一个标准的unittest模块的增强,提供了许多功能,这些功能py.test也提供。
  • nose: version 1.1.2 was freshly released 0n 2011.7.13 (nose provides an alternate test discovery and running process for unittest, one that is intended to mimic the behavior of py.test as much as is reasonably possible without resorting to too much magic)
  • nose:version 1.1.2 是发布于 0n 2011.7.13(nose为unittest提供另一种测试发现和测试处理的替代方式,它希望能够尽可能合理地和适度地模仿py.test,而不是采用太多具有魔力的方式)
Web application testing web应用测试
  • twill: version 0.7.4 was released on Thursday, December 27th, 2007( twill is a simple language that allows users to browse the Web from a command-line interface. With twill, you can navigate through Web sites that use forms, cookies, and most standard Web features.)
  • twill: version 0.7.4是在2007年12月27日星期四发布的。(twill是一种简单的语言,使用户能够从一个命令行界面的浏览网络。使用twill,您可以通过使用用户表单,临时文件,和最标准的Web功能。)
  • FunkLoad: version 1.6.1 was released on 2011-07-28 (FunkLoad offers functional, performance, load and stress testing of Web applications)
  • FunkLoad:version 1.6.1在2011-07-28上发布的(FunkLoad提供Web应用程序的功能,性能,负载和压力测试)
  • zope.testbrowser: version 4.0.2 was released on 2011-05-25 (zope.testbrowser is the stand-alone version of the Zope 3 functional testing framework)
  • zope.testbrowser:version 4.0.2 发布于2011-05-25(zope.testbrowser是Zope3功能测试框架的独立版本)
  • Django's own doctest-based test framework: 目前python的web框架都或多或者提供了测试框架这里就不再一一说明了。
GUI testing 界面测试
  • guitest: version 0.31 was released on 2005 (guitest is a Python helper library for testing Python GUI applications, with pyGTK support being the most mature)
  • guitest:version 0.31于2005年发布,以后没有更新。(guitest是一个用于测试python GUI应用的python辅助库,对pyGTK的支持是最成熟的,最适合于测试pyGTK应用。)
Various 其他
  • retest(re-try): version 0.6.1 was released on 2006 (retest enables tests of Python regular expressions in a webbrowser; it uses SimpleHTTPServer and AJAX)
  • retest(re-try):version 0.6.1发布于2006年,2009年更名为re-try,并且发布0.7.0(retest能够用于在浏览器上测试python的正则表达式,它使用了SimpleHTTPServer and AJAX)
I also want to mention MochiKit as an example of an application that makes it a point to offer top-notch tests and documentation. MochiKit is a JavaScript library that is very "Pythonical" in nature, which is not surprising given that one of its main developers is Bob Ippolito, well-known for his contributions in the Python community. One of the goals of MochiKit is to maintain 100% documentation coverage, and another is to test itself mercilessly. If only all applications followed these tenets, the world would truly be a better place . 我也想提一提MochiKit的应用,使这一个点,提供一流的测试和文档的一个例子。 MochiKit是一个JavaScript库,是非常“Pythonical”的性质,这是不奇怪,因为,它的主要开发者之一是Bob伊波利托,在Python社区的贡献众所周知。 MochiKit的目标之一是保持100%的文件覆盖,另一种是残酷地测试自身。如果所有的应用程序遵循这些原则,世界将真正成为一个更加美好的地方。