Difference between revisions of "Unit Testing"

From AstroBaki
Jump to navigationJump to search
m (moved General software tools to Unit Testing: Because this page is actually just about unit testing)
Line 1: Line 1:
==Unit Testing==
 
 
The basic idea of unit testing is to verify that a piece of code works the way it is supposed to work. That is, have the code try to solve the a problem with a known answer, and if the code does not give the right answer, it does not work. There is a module for doing this in python called unittest (or, alternatively, PyUnit).
 
The basic idea of unit testing is to verify that a piece of code works the way it is supposed to work. That is, have the code try to solve the a problem with a known answer, and if the code does not give the right answer, it does not work. There is a module for doing this in python called unittest (or, alternatively, PyUnit).
 
* [http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2010-introduction-to-unittest-a-k-a-pyunit-96-3379016 Introductory video] explaining how to use unittest, presented at PyCon
 
* [http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2010-introduction-to-unittest-a-k-a-pyunit-96-3379016 Introductory video] explaining how to use unittest, presented at PyCon
 
* [http://pyunit.sourceforge.net/pyunit.html Tutorial] by the developer of unittest
 
* [http://pyunit.sourceforge.net/pyunit.html Tutorial] by the developer of unittest

Revision as of 17:12, 20 January 2014

The basic idea of unit testing is to verify that a piece of code works the way it is supposed to work. That is, have the code try to solve the a problem with a known answer, and if the code does not give the right answer, it does not work. There is a module for doing this in python called unittest (or, alternatively, PyUnit).