SWE 437 Assignment 6
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.
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:
- Create one TDD test for the user story that does not work.
- Modify the software to make it work.
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:
- How many keywords are allowed per quote?
- How many keywords are allowed in total?
- Are keywords defined by users, or pre-defined by the software?
- Does every quote have to have keywords?
- Can a keyword also be in the quote text?
- How should keyword searching interact with the other searches?
- When quotes are printed, should the keywords also be printed?
The point of this assignment is to follow the process,
not the programming.
you must document the process in written form.
Submit the following:
- 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.
- Screen shots showing the new feature working.
- 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.
- (2 pts) Your user story.
- (10 pts) Adherence to the TDD process.
We will consider the process, the refactoring, and the clarity of your description.
You do not need as much detail as Koskela gives in chapter 2,
I want you to look at his description as a model.
- (4 pts) The quality of your TDD tests.
- (4 pts) The quality of your software.