SWE 437 Assignment 6
Spring 2018
Test Driven Development

Due 5-March, beginning of class

More than the act of testing, the act of designing tests is one of the best bug preventers known. The thinking that must be done to create a useful test can discover and eliminate bugs before they are coded—indeed, test-design thinking can discover and eliminate bugs at every stage in the creation of software, from conception to specification, to design, coding and the rest. —Boris Beizer

Use a test-driven design process to add a new feature to your quotes software. We want to allow quotes to include keywords, and allow users to search for quotes based on keywords.

First, write a user story based on the description above. Then go through the cycle depicted in the slides:

  1. Create one TDD test for the user story that does not work.
  2. Modify the software to make it work.
  3. Refactor.

Repeat this process with new TDD tests until the user story is fulfilled.

Note that the assignment does not fully specify how the keyword search should work. This is intentional, as you will be making decisions while creating the tests. You make the decisions, not me, which means the behavior your program exhibits will diverge from your classmates.

Some decisions to consider are:

The point of this assignment is to follow the process, not the programming. Therefore, you must document the process in written form. Submit the following:

  1. A document that presents your user story, then your first test, then a short description of the changes you made for the test, and a short description of the refactoring. This should be repeated, with one paragraph per test, until all tests are finished.
    Don’t forget to consider refactoring your tests.
  2. Screen shots showing the new feature working.
  3. The location of your source code. For full credit, the TA must be able to find, evaluate, download, and run your code.


We will grade on several factors.