Skip to content

A simple worked example of Test-Driven Development

Notifications You must be signed in to change notification settings

hainesr/comp61542-fibonacci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMP61542 TDD step-by-step example

Adapted from Test-Driven Development By Example, Kent Beck.

Robert Haines, University of Manchester, 2014, 2015

Working through the steps

See walkthrough-slides.pdf and walkthough-script.md in this directory for the individual steps.

In this repository each step is tagged so you can move through the example by checking each step out as you get to it. For example:

git checkout step-1

Tags are named step-n, where 1 <= n <= 8.

Running these examples

From a terminal

  1. Add the 'src' directory to the python library search path:

    export PYTHONPATH=`pwd`/src
  2. Run the tests:

    python test/test_fibonacci.py

Within Eclipse

  1. Open up the project properties and add the 'src' directory to its PYTHONPATH. How you do this will depend on which plugin you are using for python development within Eclipse.

  2. Right-click on 'test_fibonacci.py' in the 'test' directory and select 'Run As -> Python Unit Test'. Again this may differ depending on which plugin you are using.

About

A simple worked example of Test-Driven Development

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages