Revision 4 as of 2011-08-11 04:35:36

Clear message

Join the [http://lists.idyll.org/listinfo/testing-in-python Testing In Python (TIP)] mailing list for Python testing tools discussions!

Unit Testing Tools[http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy#UnitTestingTools ¶]

Tool

Category

Author

Part of

Claim to fame

[http://pyunit.sourceforge.net/pyunit.html unittest]

unit testing

[http://www.pythonconsulting.com/ Steve Purcell]

[http://docs.python.org/lib/module-unittest.html Python standard lib]

first unit test framework to be included in Python standard library; easy to use by people familiar with the xUnit frameworks; strong support for test organization and reuse via test suites

[http://docs.python.org/lib/module-doctest.html doctest]

unit testing

[http://www.python.org/peps/pep-0020.html Tim Peters]

[http://docs.python.org/lib/module-doctest.html Python standard lib]

copy and paste output from shell session; [http://agiletesting.blogspot.com/2005/02/agile-documentation-with-doctest-and.html Agile Documentation]: unit tests themselves can serve as documentation when combined with epydoc; also see [http://agiletesting.blogspot.com/2005/08/agile-documentation-in-django-project.html Django's approach]

[http://codespeak.net/py/current/doc/test.html py.test]

unit testing

[http://codespeak.net/ Holger Krekel]

[http://codespeak.net/py/current/doc/home.html py lib]

no API!;automatic collection of tests; simple asserts; strong support for test fixture/state management via setup/teardown hooks; strong debugging support via customized traceback

[http://testoob.sourceforge.net/ TestOOB]

unittest extensions

[http://freshmeat.net/%7Eoripel/ Ori Peleg]

unittest enhancements; test filtering via regex/glob patterns; reporting in XML/HTML; colorized output; runs pdb on failing tests; run in parallel in threads/processes; verbose asserts; report failures immediately; and a little more;

[http://somethingaboutorange.com/mrl/projects/nose/ nose]

unittest extensions

[http://somethingaboutorange.com/mrl/ Jason Pellerin]

unit test framework, used most notably by [http://www.turbogears.org/ TurboGears] and [http://pylonshq.com/ Pylons]; 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. More friendly with unittest.TestCase-based tests than py.test. There are also many [http://nose-plugins.jottit.com/ plugins] available.

[http://twistedmatrix.com/trac/wiki/TwistedTrial Trial]

unittest extensions

[http://mumak.net/wiki Jonathan Lange]

[http://www.twistedmatrix.com/ Twisted]

Extension of unittest to support writing asynchronous unit tests using Deferreds and new result types ('skip' and 'todo'). Includes a command-line program that does test discovery and integrates with doctest and coverage.

[http://www.robertcollins.net/unittest/subunit subunit]

unittest extensions

[http://www.robertcollins.net/ Robert Collins]

Transparently adds support for running unittest test cases/suites in a separate process : prevents system wide changes by a test destabilising the test runner. It also allows reporting from tests in another process into the unittest framework, giving a single integrated test environment.

[http://www.robertcollins.net/unittest/testresources testresources]

unittest extensions

[http://www.robertcollins.net/ Robert Collins]

Provides a mechanism for managing 'resources' - expensive bits of infrastructure - that are needed by multiple tests. Resources are constructed and free on demand, but with an optional [http://pycheesecake.org/wiki/TestSuite TestSuite?], the test run order is optimised to reduce the number of resource constructions and releases needed. Compatible with unittest.

[https://launchpad.net/testtools testtools]

unittest extensions

[http://mumak.net/wiki Jonathan Lange]

Useful extensions to unittest derived from custom extensions by projects such as Twisted and Bazaar.

[http://www.mems-exchange.org/software/sancho/ Sancho]

unit testing

[http://www.mems-exchange.org/ MEMS and Nanotechnology Exchange]

[http://www.mems-exchange.org/software/ MEMS Exchange tools]

Sancho 2.1 runs tests, and provides output for tests that fail; Sancho 2.1 does not count tests passed or failed; targets projects that do not maintain failing tests

[http://sourceforge.net/projects/pyunitperf pyUnitPerf]

performance-based unit testing

[http://agiletesting.blogspot.com/ Grig Gheorghiu]

port of [http://www.clarkware.com/software/JUnitPerf.html JUnitPerf]; transparently adds [http://agiletesting.blogspot.com/2004/12/performance-testing-with-pyunitperf.html performance testing capabilities] to existing unitttest-based test suites

[http://www.accesscom.com/%7Edarius/software/clickcheck.html Peckcheck]

specification-based unit testing

[http://www.accesscom.com/%7Edarius/personal/contact.html Darius Bacon]

like the unittest module, except that test methods may take arguments; you declare each argument with a default value which names a test-data generator and the peckcheck module will peck at your test methods with a bunch of generated values

[http://projects.edgewall.com/qunittest/ qunittest]

unit testing

[http://www.edgewall.com/ Edgewall]

Easy-to-use (PyQt) GUI framework and application for use with the Python unit testing framework. It can be used to conveniently execute unit tests and suites, and then display the results in a useful fashion.

[http://www.zetadev.com/software/testosterone/ testosterone]

unit testing

[http://www.zetadev.com/ Chad Whitacre]

A manly test runner; command-line and curses(3) interfaces; the iPod of test runners. (More seriously, makes it easier to browse and inspect your test failures)

[http://cheeseshop.python.org/pypi/zope.testing zope.testing]

unit testing

Zope3 community

Powerful test runner that includes support for post-mortem debugging of test failures. Also includes profiling and coverage reporting. This is a standalone package that has no dependencies on Zope and works just fine with projects that don't use Zope.

[http://dev.nullcube.com/ pry]

unit testing

[http://www.nullcube.com/ Aldo Cortesi]

Elegant unit testing framework with built-in coverage analysis, profiling, micro-benchmarking and a powerful command-line interface.

[http://pythoscope.org/ pythoscope]

unit testing

[http://joker.linuxstuff.pl/ Michal Kwiatkowski]

Tool that will automatically, or semi-automatically, generate unit tests for legacy systems written in Python.

[http://www.logilab.org/project/logilab-common/ testlib]

unittest extensions

[http://www.logilab.fr/ Logilab]

logilab-common

Gives more power to standard unittest. More assert* methods; support for module level setup/teardown; skip test feature...

[http://www.logilab.org/project/logilab-common/ pytest]

tests runner

[http://www.logilab.fr/ Logilab]

logilab-common

Tests finder / runner. Selectivly run tests; Stop on first failure; Run pdb on failed tests; Colorized reports; Run tests with coverage / profile enabled...

[http://pypi.python.org/pypi/dutest dutest]

unittest extensions

[https://opensvn.csie.org/traccgi/swlcu/ Olemis Lang]

[http://flioops.sf.net/ PyOOP package] (distributed separately too)

An object oriented interface to retrieve unittest test cases out of doctests. Hides initialization from doctests by allowing setUp and tearDown for each interactive example. Allows control over all the options provided by doctest. Specialized classes allow selective test discovery across a package hierarchy.

Mock Testing Tools[http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy#MockTestingTools ¶]

Tool

Category

Author

Claim to fame

[http://github.com/nsigustavo/ludibrio/ Ludibrio]

mocks, stubs, spy, and dummies

Gustavo Rezende

Elegant test doubles framework in Python (mocks, stubs, spy, and dummies)

[http://python-mock.sourceforge.net/ Python Mock]

mock testing

[http://www.thedeveloperscoach.com/ Dave Kirby]

Python Mock enables the easy creation of mock objects that can be used to emulate the behaviour of any class that the code under test depends on. You can set up expectations about the calls that are made to the mock object, and examine the history of calls made. This makes it easier to unit test classes in isolation. [http://sourceforge.net/projects/python-mock/ Download it here.]

[http://theblobshop.com/pymock PyMock]

mock testing

[http://theblobshop.com/ Jeff Younker]

PyMock is based on the Java [http://www.easymock.org/ easymock] package. It uses a recording and replay model rather than using a specification language. Easymock lives up to its name compared to other mocking packages. PyMock takes advantage of python's dynamic nature for futher improvements.

[http://www.voidspace.org.uk/python/mock.html mock]

mock testing

Michael Foord aka [http://www.voidspace.org.uk/python/weblog/index.shtml Fuzzyman]

Provides "action -> assertion" mocking patter, instead of standard "record -> replay" pattern

[http://pmock.sourceforge.net/ pMock]

mock testing

Graham Carlyle

Inspired by the Java [http://www.jmock.org/ jMock] library, pMock makes the writing of unit tests using mock object techniques easier. Development of pmock has long since stopped and so it can be considered dead.

[http://blog.ianbicking.org/minimock.html minimock]

mock testing

[http://blog.ianbicking.org/ Ian Bicking]

Embeds mock testing constructs inside doctest tests.

[http://oakwinter.com/code/svnmock/ svnmock]

mock testing

[http://oakwinter.com/code/ Collin Winter]

enables easier testing of Python programs that make use of [http://subversion.tigris.org/ Subversion's] Python bindings

[http://labix.org/mocker Mocker]

mock testing

[http://blog.labix.org/ Gustavo Niemeyer]

Graceful platform for test doubles in Python (mocks, stubs, fakes, and dummies). Well-documented and fairly feature-complete.

[http://www.reahl.org/project?name=stubble Stubble]

stub testing

[http://www.reahl.org/ Iwan Vosloo]

Stubble allows you to write arbitrary classes for use as stubs instead of read classes while testing. Stubble lets you link a stub class loosely to the real class which it is a stub for. This information is then used to ensure that tests will break if there is a discrepancy between the interface supported by your stub class and that of the real class it stands in for.

[http://code.google.com/p/pymox/ Mox]

mock testing

smiddlek, dglasser

Mox is based on EasyMock, a Java mock object framework. Mox will make mock objects for you, so you don't have to create your own! It mocks the public/protected interfaces of Python objects. You set up your mock objects expected behavior using a domain specific language (DSL), which makes it easy to use, understand, and refactor!

[http://github.com/gfxmonk/mocktest/tree/master MockTest]

mock testing

Tim Cuthbertson (gfxmonk)

Mocktest allows you to mock / stub objects and make expectations about the methods you expect to be called as well as the arguments they should be called with. Expectations are very readable and expressive, and checked automatically. Any stubbed methods are reverted after each test case. Still under development, so subject to change

[http://farmdev.com/projects/fudge/ Fudge]

mock and stub testing

[http://farmdev.com/ Kumar McMillan]

A module for using fake objects (mocks, stubs, etc) to test real ones. Uses a declrative syntax like jMock whereby you set up expectations for how an object should be used. An error will raise if an expectation is not met.

[http://code.google.com/p/mockito/wiki/MockitoForPython Mockito for Python]

mock and stub testing

[http://monkeyisland.pl/ Szczepan Faber]

A port of the [http://code.google.com/p/mockito/ Mockito] mocking framework to Python. (Technically speaking, Mockito is a Test Spy framework.)

Fuzz Testing Tools[http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy#FuzzTestingTools ¶]

According to Wikipedia, [http://en.wikipedia.org/wiki/Fuzz_testing "fuzz testing" (or "fuzzing")] is a software testing technique whose basic idea is to attach the inputs of a program to a source of random data ("fuzz"). If the program fails (for example, by crashing, or by failing built-in code assertions), then there are defects to correct. The great advantage of fuzz testing is that the test design is extremely simple, and free of preconceptions about system behavior.

Tool

Author

Claim to fame

[http://jester.sourceforge.net/ Pester]

Ivan Moore

Tests your tests by mutating source code and finding tests that don't fail!

[http://peachfuzz.sourceforge.net/ Peach Fuzzer Framework]

Michael Eddington

Peach can fuzz just about anything from .NET, COM/ActiveX, SQL, shared libraries/DLL's, network applications, web, you name it.

[http://antiparser.sourceforge.net/ antiparser]

dmckinney

The purpose of antiparser is to provide an API that can be used to model network protocols and file formats by their composite data types. Once a model has been created, the antiparser has various methods for creating random sets of data that deviates in ways that will ideally trigger software bugs or security vulnerabilities.

[http://sourceforge.net/projects/taof Taof (The Art Of Fuzzing)]

rodrigomarcos

Taof is a GUI cross-platform Python generic network protocol fuzzer. It has been designed for minimizing set-up time during fuzzing sessions and it is specially useful for fast testing of proprietary or undocumented protocols.

[http://fusil.hachoir.org/trac Fusil (Fusil the fuzzer)]

[http://www.haypocalc.com/wiki/Victor_Stinner Victor Stinner]

It helps to start process with a prepared environment (limit memory, environment variables, redirect stdout, etc.), start network client or server, and create mangled files. Fusil has many probes to detect program crash: watch process exit code, watch process stdout and syslog for text patterns (eg. "segmentation fault"), watch session duration, watch cpu usage (process and system load), etc.

Web Testing Tools[http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy#WebTestingTools ¶]

First, let's define some categories of Web testing tools:

Unable to edit the page? See the FrontPage for instructions.