Skip to content

Commit

Permalink
Outline of contents for testing cheat sheet.
Browse files Browse the repository at this point in the history
  • Loading branch information
benwaugh committed Mar 28, 2013
1 parent be17770 commit 91cb99b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions testing/cheat-sheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Testing Cheat Sheet
===================

Terminology
-----------

* A *unit test* acts on an isolated component within an application.
* A *test fixture* is the input data that a test acts on.
* The *interface* of a function is its public face, defined by its
input and output.
* The *implementation* of a function is how it gets from the input to
the output.
* A *stub* is a very simple implementation of one function that is
used in a test of a different function.

Unit Testing
------------

* A *normal case* is a test case that reflects what is expected to be
typical usage of a function.
* A *boundary case* is a test case that reflects a less typical but
potentially troublesome type of usage.

Exceptions
----------

* raise
* catch
* define

Assertions
----------

* syntax
* stops execution

Unittest
--------

* extending TestCase
* assertions, e.g. self.assertEquals

Nose
----

* invocation: nosetests
* naming conventions: test_*
* fixtures: setup
* per-test fixtures with @with_setup decorator
* assertions, e.g. assert_equal, assert_almost_equal...

0 comments on commit 91cb99b

Please sign in to comment.